Video encoding method and apparatus using transformation unit of variable tree structure, and video decoding method and
apparatus

ABSTRACT

A video encoding method is provided, the method includes: encoding a current region of a video by performing a transformation on the current region by using transformation units in a variable tree-structure which are determined from among transformation units that are hierarchically split from a base transformation unit with respect to the current region and which are generated based on a maximum split level of a transformation unit; and outputting encoded data of the current region, information about an encoding mode, and transformation-unit hierarchical-structure information comprising maximum size information and minimum size information of the transformation unit with respect to the video.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.13/817,724 filed on Feb. 19, 2013, which is a National Stage Entry ofPCT/KR2011/006037, filed on Aug. 17, 2011, which claims priority to U.S.provisional patent application No. 61/374,348 filed on Aug. 17, 2010 inthe U.S. Patent and Trademark Office, the contents of all of which areincorporated herein by reference in their entirety.

BACKGROUND

1. Field

Exemplary embodiments relate to video encoding and decoding in which atransformation between a spatial domain and a transform domain isperformed.

2. Related Art

As hardware for reproducing and storing high resolution or high qualityvideo content is being developed and supplied, a need for a video codecfor effectively encoding or decoding the high resolution or high qualityvideo content is increasing. In a related art video codec, a video isencoded according to a limited encoding method based on a macroblockhaving a predetermined size. Also, in the related art video codec, videodata is encoded and decoded by performing a transformation andinverse-transformation by using macroblocks having the same size.

SUMMARY

Exemplary embodiments provide a method and apparatus for encoding anddecoding video by performing a transformation and inverse-transformationby using a data unit in a variable hierarchical structure.

According to an exemplary embodiment, there is provided a video encodingmethod, the method includes: encoding a current region of a video byincluding operations of performing a transformation on the currentregion by using transformation units in a variable tree-structure whichare determined from among transformation units that are hierarchicallysplit from a base transformation unit with respect to the current regionand which are generated based on a maximum split level of atransformation unit, and determining transformation units from among thetransformation units in the variable tree-structure with respect to thecurrent region; and outputting encoded data of the current region whichis generated via encoding including the transformation based on thedetermined transformation units, information about an encoding modedetermined in the encoding with respect to the current region, andtransformation-unit hierarchical-structure information including maximumsize information and minimum size information of the transformation unitwith respect to the video.

According to an aspect of an exemplary embodiment, there is provided avideo encoding method, in order to encode a current region of a video,including operations of performing a transformation on the currentregion by using transformation units in a variable tree-structure whichare determined from among transformation units that are hierarchicallysplit from a base transformation unit with respect to the current regionand which are generated based on a maximum split level of atransformation unit, and determining transformation units from among thetransformation units in the variable tree-structure with respect to thecurrent region; and outputting encoded data of the current region whichis generated via encoding including the transformation based on thedetermined transformation units, information about an encoding modedetermined in the encoding with respect to the current region, andtransformation-unit hierarchical-structure information including maximumsize information and minimum size information of the transformation unitwith respect to the video.

According to another aspect of an exemplary embodiment, there isprovided a video decoding method including operations of receiving abitstream including data obtained by encoding a video; parsing thebitstream and extracting, from the bitstream, encoded data of a currentregion, information about an encoding mode determined in the encodingwith respect to the current region, and transformation-unithierarchical-structure information including maximum size informationand minimum size information of the transformation unit with respect tothe video; and performing an inverse-transformation on the currentregion by using transformation units in a variable tree-structure whichare determined from among transformation units that are hierarchicallysplit from a base transformation unit with respect to the current regionand which are generated based on a maximum split level of thetransformation unit, decoding the encoded data of the current region,and restoring the video.

The transformation-unit hierarchical-structure information may furtherinclude maximum split information indicating the maximum split level ofthe transformation unit.

A size of the base transformation unit with respect to the currentregion may be equal to or less than a maximum size of the transformationunit with respect to the video.

A transformation unit may be split once so that transformation units ata next lower level may be generated, a level of a predeterminedtransformation unit may indicate a total number of splits so as togenerate the predetermined transformation unit by stepwise splitting thebase transformation unit, and the base transformation unit with respectto the current region may be a maximum and uppermost-leveltransformation unit that is usable with respect to the current region.

The transformation units in the variable tree-structure that aregenerated based on the maximum split level of the transformation unitwith respect to the current region may include the base transformationunit and transformation units according to levels that are generated bystepwise splitting the base transformation unit to the maximum splitlevel.

A minimum size of the transformation units with respect to the currentregion may be determined as a larger one from among a minimum size ofthe transformation unit with respect to the video and a size of atransformation unit at a lowermost level which is obtained by splittingthe base transformation unit to the maximum split level.

The maximum split level of the transformation unit may be equal to orless than a total number of levels from a maximum coding unit to aminimum coding unit that respectively correspond to a maximum size and aminimum size of the transformation units with respect to the video.

The size of the base transformation unit may be determined based on atleast one of a prediction mode and a partition size which are used inencoding of the current region.

The maximum split level of the transformation unit with respect to thecurrent region may be set for each of data groups at a data level fromamong data levels including a picture sequence, a picture, a slice, anda data unit for the encoding of the video, and the maximum splitinformation of the transformation unit may be encoded as a parameterwith respect to a data level by which the maximum split level isdetermined.

The maximum split level of the transformation unit with respect to thecurrent region may be separately determined in each of prediction modesused while the encoding is performed on the current region.

The maximum split level of the transformation unit with respect to thecurrent region may be separately determined in each of slice types usedwhile the encoding is performed on the current region.

The size of the base transformation unit with respect to the currentregion may be constant.

The base transformation unit with respect to the current region may bedetermined as data units having shapes that are included in partitionsso as not to span a boundary between the partitions that are data unitsfor prediction encoding with respect to the current region.

Transformation units at lower levels which are obtained by splitting thebase transformation unit with respect to the current region may bedetermined as data units having shapes that are included in thepartitions so as not to span the boundary between the partitions thatare the data units for prediction encoding with respect to the currentregion.

According to another aspect of an exemplary embodiment, there isprovided a video encoding apparatus including a transformation-unitdetermining unit, in order to encode a current region of the video,performing a transformation on the current region by usingtransformation units in a variable tree-structure which are determinedfrom among transformation units that are hierarchically split from abase transformation unit with respect to the current region and whichare generated based on a maximum split level of a transformation unit,and determining transformation units from among the transformation unitsin the variable tree-structure with respect to the current region; andan output unit outputting encoded data of the current region which isgenerated via encoding including the transformation based on thedetermined transformation units, information about an encoding modedetermined in the encoding with respect to the current region, andtransformation-unit hierarchical-structure information including maximumsize information and minimum size information of the transformation unitwith respect to the video.

According to another aspect of an exemplary embodiment, there isprovided a video decoding apparatus including a receiving unit receivinga bitstream including data obtained by encoding the video; an extractingunit parsing the bitstream and extracting, from the bitstream, encodeddata of a current region, information about an encoding mode determinedin the encoding with respect to the current region, andtransformation-unit hierarchical-structure information including maximumsize information and minimum size information of the transformation unitwith respect to the video; and a decoding unit performing aninverse-transformation on the current region by using transformationunits in a variable tree-structure which are determined from amongtransformation units that are hierarchically split from a basetransformation unit with respect to the current region and which aregenerated based on a maximum split level of the transformation unit,decoding the encoded data of the current region, and restoring thevideo.

According to another aspect of an exemplary embodiment, there isprovided a computer-readable recording medium having recorded thereon aprogram for executing the video encoding method. According to anotheraspect of an exemplary embodiment, there is provided a computer-readablerecording medium having recorded thereon a program for executing thevideo decoding method.

Accordingly, in a process of encoding and decoding a video,transformation and inverse-transformation are performed by usingtransformation units having various sizes and shapes in atree-structure, whereby the video may be efficiently encoded anddecoded, in consideration of an image characteristic.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a video encoding apparatus usingtransformation unit in variable tree-structure according to an exemplaryembodiment.

FIG. 2 is a block diagram of a video decoding apparatus usingtransformation unit in variable tree-structure, according to anexemplary embodiment.

FIG. 3 illustrates a hierarchy model of a transformation unit in a treestructure, according to an exemplary embodiment.

FIG. 4 illustrates a hierarchy model of a transformation unit in avariable tree-structure, according to an exemplary embodiment.

FIGS. 5 through 8 illustrate base transformation units, according tovarious aspects of an exemplary embodiment.

FIGS. 9 and 10 illustrate transformation units in a variabletree-structure, according to various aspects of an exemplary embodiment.

FIG. 11 is a flowchart of a video encoding method using transformationunits in a variable tree-structure, according to an exemplaryembodiment.

FIG. 12 is a flowchart of a video decoding method using transformationunits in a variable tree-structure, according to an exemplaryembodiment.

FIG. 13 is a block diagram of a video encoding apparatus usingtransformation unit in tree structure and transformation unit invariable tree-structure, according to an exemplary embodiment.

FIG. 14 is a block diagram of a video decoding apparatus usingtransformation unit in tree-structure and transformation unit invariable tree-structure, according to an exemplary embodiment.

FIG. 15 is a diagram for describing a concept of coding units accordingto an exemplary embodiment.

FIG. 16 is a block diagram of an image encoder based on coding units,according to an exemplary embodiment.

FIG. 17 is a block diagram of an image decoder based on coding units,according to an exemplary embodiment.

FIG. 18 is a diagram illustrating deeper coding units according todepths, and partitions, according to an exemplary embodiment.

FIG. 19 is a diagram for describing a relationship between a coding unitand transformation units, according to an exemplary embodiment.

FIG. 20 is a diagram for describing encoding information of coding unitscorresponding to a coded depth, according to an exemplary embodiment.

FIG. 21 is a diagram of deeper coding units according to depths,according to an exemplary embodiment.

FIGS. 22 through 24 are diagrams for describing a relationship betweencoding units, prediction units, and transformation units, according toan exemplary embodiment.

FIG. 25 is a diagram for describing a relationship between a codingunit, a prediction unit or a partition, and a transformation unit,according to encoding mode information of Table 1 according to anexemplary embodiment.

FIG. 26 is a flowchart illustrating a video encoding method using acoding unit in a tree structure and a transformation unit in a variabletree-structure, according to an exemplary embodiment.

FIG. 27 is a flowchart illustrating a video decoding method using acoding unit in a tree structure and a transformation unit in a variabletree-structure, according to an exemplary embodiment.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Hereinafter, in one or more exemplary embodiments described below, an‘image’ may collectively indicate not only a still image but also amoving picture including a video.

When various operations related to the image are performed, data relatedto the image may be split into data groups, and the same operation maybe performed on a plurality of pieces of data included in the same datagroup. Hereinafter, throughout the specification, a data group that isformed according to a predetermined standard is referred to as ‘dataunit’. Hereinafter, throughout the specification, an operation that isperformed on every ‘data unit’ means that the operation is performed byusing a plurality of pieces of data included in the data unit.

Hereinafter, with reference to FIGS. 1 through 12, video encoding anddecoding using a transformation unit in a variable tree-structure willbe described. Hereinafter, with reference to FIGS. 13 through 27, videoencoding and decoding using a coding unit in a tree-structure and atransformation unit in a variable tree-structure will be described.

Hereinafter, with reference to FIGS. 1 through 12, a video encodingapparatus and a video decoding apparatus, and a video encoding methodand a video decoding method, which use a transformation unit in avariable tree-structure, will be described.

FIG. 1 is a block diagram of a video encoding apparatus usingtransformation unit in variable tree-structure 10 according to anexemplary embodiment.

The video encoding apparatus using transformation unit in variabletree-structure includes a transformation-unit determining unit 11 and anoutput unit 13. Hereinafter, for convenience of description, the videoencoding apparatus using transformation unit in variable tree-structure10 is referred to as ‘video encoding apparatus 10’. Operations by thetransformation-unit determining unit 11 and the output unit 13 of thevideo encoding apparatus 10 may be cooperatively controlled by a videoencoding processor, a central processor, a graphic processor, or thelike.

In order to encode a current picture of an input video, the videoencoding apparatus 10 splits the current picture into data units havinga predetermined size and then performs encoding for each of the dataunits.

For example, the current picture consists of pixels of a spatial domain.In order to allow adjacent pixels in a predetermined range to form agroup so as to allow pixels that are spatially adjacent to each other inthe current picture to be encoded together, the current picture may besplit into pixel groups having a predetermined size. By a series ofencoding operations that are performed on pixels of split pixel groupshaving the predetermined size, encoding with respect to the currentpicture may be performed.

Since initial data that is an encoding target of a picture is a pixelvalue of the spatial domain, each of the pixel groups having thepredetermined size may be used as a data unit that is an encodingtarget. Also, transformation for video encoding is performed on pixelvalues of the pixel group of the spatial domain, so that transformcoefficients of a transform domain are generated, and in this regard,the transform coefficients maintain a coefficient group having the samesize as the pixel group of the spatial domain. Thus, the coefficientgroup of the transform coefficients of the transform domain may also beused as a data unit for encoding of a picture.

Thus, throughout the spatial domain and the transform domain, a datagroup having a predetermined size may be used as a data unit forencoding. Here, a size of the data unit may be defined as a total numberof pieces of data included in the data unit. For example, a total numberof the pixels of the spatial domain or a total number of the transformcoefficients of the transform domain may indicate the size of the dataunit.

Hereinafter, a ‘current region’ may indicate a data group having a datalevel that is one of a data unit, a slice, a picture, and a picturesequence which are encoding targets in a video.

The video encoding apparatus 10 may perform prediction encodingincluding inter prediction and intra prediction, transform andquantization, and entropy encoding on each of regions, therebyperforming encoding on the current picture.

The transformation-unit determining unit 11 determines a transformationunit that is a data unit to perform transformation on a current regionof the current picture. The transformation unit may be determined as thedata unit having a size equal to or less than the current region so asto be included in the current region.

For example, the transformation-unit determining unit 11 may generatethe transformation unit by halving a height and a width of the currentregion. Also, the transformation-unit determining unit 11 may generatethe transformation unit by asymmetrically splitting at least one of theheight and the width of the current region. The transformation-unitdetermining unit 11 may generate the transformation unit by splitting atleast one of the height and the width of the current region according toan arbitrary ratio. The transformation unit may be a polygonal-shapedata unit included in the current region.

The transformation-unit determining unit 11 may generate transformationunits at a lower level by splitting again at least one of a height and awidth of the transformation unit.

The transformation-unit determining unit 11 may determine transformationunits in a tree structure for transformation of the current region. Thetransformation units in a tree structure include final transformationunits that are determined to output a transformation result and that aredetermined from among transformation units in the current region.

In order to determine the transformation units in a tree structure, thetransformation-unit determining unit 11 may generate transformationunits at a lower level by repeatedly splitting at least one of a heightand a width of a predetermined transformation unit from among thetransformation units in the current region.

Also, the transformation-unit determining unit 11 may determine whetherto split each of the transformation units into transformation units at alower level, and the determination may be independently performed ineach of transformation units that have the same level and that aregenerated by being split from an upper-level transformation unit.

In one embodiment, an operation in which a transformation unit having apredetermined level is split into transformation units at a lower levelmay include an operation in which at least one of the transformationunits having the predetermined level is split.

For example, from an uppermost transformation unit of the current regionto a predetermined level, all transformation units may be split or maynot be split at every split level.

In another embodiment, when a transformation unit is split from apredetermined level to a lower level, whether to split transformationunits at a certain level may be independently determined at everypredetermined level, so that sizes of transformation units at a lowerlevel may not be constant.

The transformation-unit determining unit 11 generates residual data byperforming the inter prediction or the intra prediction on the currentregion, and performs transformation with respect to the residual databased on a transformation unit determined by the transformation-unitdetermining unit 11, so that the transformation-unit determining unit 11encodes the current region. That is, the residual data for eachpartition for prediction of the current region is re-split by using thetransformation unit determined by the transformation-unit determiningunit 11, so that transformation may be performed on the residual datafor each of the transformation units.

In the present embodiment, ‘transformation’ for video encoding indicatesa data processing technique used to transform video data of a spatialdomain into data of a transform domain. The transformation for videoencoding, which is performed by the transformation-unit determining unit11, may include frequency transformation, orthogonal transformation,integer transformation, and the like.

The transformation-unit determining unit 11 may repeatedly performtransformation on transformation units that are included in the currentregion and that are at all levels according to a hierarchical structure,by using transformation units according to the levels, may compare anerror of the transformation by the transformation units according to thelevels, and thus may select the transformation units at a level whichcauses a minimum error. The transformation unit at the level, whichgenerates a transform coefficient that causes a minimum error, may bedetermined as a transformation unit with a transformation depth that isa level at which a transformation result is output.

Accordingly, the transformation-unit determining unit 11 may determinethe transformation units in a tree structure including thetransformation units that are determined to output the transformationresult.

According to the present embodiment, a maximum size and a minimum sizeof a transformation unit with respect to the video may be set inadvance. The transformation-unit determining unit 11 may determine abase transformation unit that is equal to or less than the maximum sizeof the transformation unit with respect to the video, for each ofregions in the current picture. The base transformation unit is amaximum and uppermost-level transformation unit that is usable in thecurrent region.

The transformation-unit determining unit 11 may limit a total number oflevels of a transformation unit in the current region. Thetransformation unit is split once so that transformation units at alower level are generated, and a level of a predetermined transformationunit may indicate a total number of splits performed until thepredetermined transformation unit is generated after the basetransformation unit is split according to levels. Thus, a maximum splitlevel of the transformation unit in the current region may be related toa maximum total number of splits from the base transformation unit ofthe current region to a transformation unit at a lowermost level.

According to the base transformation unit and the maximum split level ofthe transformation unit which may be variously set with respect to thecurrent region, a total number of levels and a hierarchical structure ofthe transformation unit may be changed. Accordingly, thetransformation-unit determining unit 11 may use transformation units ina variable tree structure, based on the maximum split level of thetransformation unit. The transformation units in the variable treestructure may include the base transformation unit, and transformationunits according to levels that are generated by being stepwise splitfrom the base transformation unit to the maximum split level of thetransformation unit.

The transformation-unit determining unit 11 may perform transformationon the current region based on transformation units in a variabletree-structure which are generated based on the maximum split level ofthe transformation unit and which are determined from among thetransformation units that are stepwise split from the basetransformation unit with respect to the current region. Thetransformation-unit determining unit 11 may finally determinetransformation units that are from among the transformation units in thevariable tree-structure and that are to be used in outputting atransform coefficient of the current region.

A minimum size of the transformation units with respect to the currentregion may be determined as a greater one from among a minimum size of atransformation unit with respect to the video and a size of thetransformation unit at the lowermost level which is obtained bysplitting the base transformation unit to the maximum split level of thetransformation unit.

A maximum total number of splits of a transformation unit may be equalto or less than a total number of splits from a maximum transformationunit to a minimum transformation unit which respectively correspond to amaximum size and the minimum size of the transformation units withrespect to the current region. Thus, the maximum split level of thetransformation unit may be equal to or less than the total number ofsplits from the maximum transformation unit to the minimumtransformation unit which respectively correspond to the maximum sizeand the minimum size of the transformation units with respect to thecurrent region.

A size of base transformation units with respect to the current regionmay be constant. Also, base transformation units having different sizesmay be set according to characteristics of regions. For example, a sizeof the base transformation unit may be determined based on at least oneof a prediction mode and a partition size which are used in encoding ofthe current region.

The maximum split level of the transformation unit may be set for eachdata group at a predetermined level from among data levels including apicture sequence, a picture, a slice, and an encoding data unit whichare of the video. That is, for example, the maximum split level withrespect to a current picture sequence may be set or the maximum splitlevel may be set for each picture, each slice, or each data unit. Inanother example, the maximum split level of the transformation unit maybe implicitly set in advance between encoding and decoding systems.

The maximum split level of the transformation unit with respect to thecurrent region may be separately determined for each slice type that isused in encoding of the current region.

The base transformation unit with respect to the current region may bedetermined as a data unit having a shape included in partitions that area data unit for the prediction encoding of the current region, wherebythe data unit may not span a boundary between the partitions.

Also, transformation units at a lower level which are obtained bysplitting the base transformation unit with respect to the currentregion may be determined as data units having a shape included in thepartitions that are the data unit for the prediction encoding of thecurrent region, whereby the data units may not span the boundary betweenthe partitions.

Examples related to the decision of the base transformation unit and thetransformation units at the lower level are described later withreference to FIGS. 5 through 10.

The output unit 13 may output a bitstream including encoded data of thecurrent region, information about the encoding mode, and various typesof information about a transformation unit.

The output unit 13 may output the encoded data of the current regionwhich is generated after various encoding operations including thetransformation based on the transformation unit determined by thetransformation-unit determining unit 11, and quantization, interprediction, intra prediction, entropy encoding, or the like.

The output unit 13 may output various types of information about theencoding modes related to encoding schemes used in the various encodingoperations including the transformation based on the transformation unitdetermined by the transformation-unit determining unit 11, andquantization, inter prediction, intra prediction, entropy encoding, orthe like.

The output unit 13 may output transformation-unit hierarchical-structureinformation indicating the hierarchical structure of transformationunits with respect to the video. The transformation-unithierarchical-structure information may include information about themaximum size and the minimum size of the transformation unit withrespect to the video, and transformation index information.

In an embodiment, the transformation index information may indicateinformation about a structure of the transformation unit that is used intransformation of the current region. For example, the transformationindex information may include a total number of splits from the currentregion to a transformation unit at a lowermost level, a size of thetransformation unit, and a shape of the transformation unit.

In another embodiment according to a case that a transformation unit atan upper level is split into transformation units having the same sizeat every level, the transformation index information may indicate atotal number of splits the current region to the transformation unit atthe lowermost level.

The output unit 13 may output the information about the maximum size andthe minimum size of the transformation unit with respect to the video.In an embodiment, the information about the maximum size and the minimumsize of the transformation unit with respect to the video may be outputwhile included in a sequence parameter set or a picture parameter set ofa video stream.

The transformation-unit hierarchical-structure information may includetransformation-unit maximum split information indicating the maximumsplit level of the transformation unit. Thus, the output unit 13 mayencode and output the transformation-unit maximum split information. Inan embodiment, the transformation-unit maximum split information may beoutput while included in the sequence parameter set or the pictureparameter set, or may be set for each slice or each region having apredetermined size.

In another embodiment, when the maximum split level of thetransformation unit is implicitly set in advance between the encodingand decoding systems, it is not required to encode and output thetransformation-unit maximum split information.

The output unit 13 may determine transformation-unit sub-splitinformation for each transformation unit in the variable tree-structurewith respect to the current region, and then may output thetransformation-unit sub-split information that indicates whether acertain transformation unit is split into transformation units at a nextlower level. The output unit 13 may skip the transformation-unitsub-split information with respect to a transformation unit having aminimum size that is from among transformation units determined withrespect to the current region and that is allowed with respect to thecurrent region.

The output unit 13 may determine and output hierarchicaltransformation-units pattern information for each of transformationunits that are determined with respect to the current region, and thehierarchical transformation-units pattern information may indicateexistence of a transformation unit that includes a non-zero coefficientand that is from among transformation units at a lower level.

FIG. 2 is a block diagram of a video decoding apparatus usingtransformation unit in variable tree-structure 20, according to anexemplary embodiment.

The video decoding apparatus using transformation unit in variabletree-structure 20 includes a receiving unit 21, an extracting unit 23,and a decoding unit 25. Hereinafter, for convenience of description, thevideo decoding apparatus using transformation unit in variabletree-structure 20 is referred to as ‘video decoding apparatus 20’.Operations by the receiving unit 21, the extracting unit 23, and thedecoding unit 25 of the video decoding apparatus 20 may be cooperativelycontrolled by a video encoding processor, a central processor, a graphicprocessor, or the like.

In order to restore an image from a bitstream, the video decodingapparatus 20 may perform operations including entropy decoding,inverse-quantization, inverse-transformation, interprediction/compensation, and intra prediction/compensation, therebydecoding encoded image data of the bitstream.

The receiving unit 21 receives and parses a bitstream with respect to anencoded video. The extracting unit 23 extracts data encoded with respectto each of regions of a current picture, information about an encodingmode, and various types of information about a transformation unit fromthe bitstream that is parsed by the receiving unit 21.

The extracting unit 23 may deliver encoded data of a current region, theinformation about the encoding mode, and the various types ofinformation about the transformation unit to the decoding unit 25.

The decoding unit 25 may perform various decoding operations includingentropy decoding, inverse-quantization, inverse-transformation, interprediction/compensation, and intra prediction/compensation on theencoded data, according to various decoding schemes that are determinedbased on the information about the encoding mode, may restore a pixelvalue of the current region, and then may restore the current picture.

The extracting unit 23 may extract transformation-unithierarchical-structure information such as maximum size information andminimum size information of the transformation unit, maximum sizeinformation and minimum size information of the transformation unit, orthe like which are related to a hierarchical structure of thetransformation unit from the bitstream.

The decoding unit 25 may determine a transformation unit required forthe inverse-transformation with respect to the current region, based onthe various types of information about the transformation unit which areextracted by the extracting unit 23, and may perform theinverse-transformation with respect to the current region based on thetransformation unit. The inverse-transformation that is performed fordecoding of the video, by the decoding unit 25, may indicate a processof transforming data of a transform domain to data of a spatial domain.The inverse-transformation by the decoding unit 25 may include inversefrequency transformation, inverse orthogonal transformation, inverseinteger transformation, and the like.

Concepts of a transformation unit, a base transformation unit, and ahierarchical structure of the transformation unit are the same as theaforementioned descriptions with reference to FIG. 1 and the videoencoding apparatus 10. That is, in the present embodiment, thetransformation unit is generated by splitting at least one of a heightand a width of the current region or a transformation unit at an upperlevel according to an arbitrary ratio.

In particular, transformation units in a variable tree-structure may bedetermined based on a maximum split level of a transformation unit or amaximum total number of splits of the transformation unit with respectto the current region. That is, the transformation units in a variabletree-structure may include a base transformation unit, andtransformation units at a lower level which are split from the basetransformation unit to the maximum split level that is allowed in thecurrent video.

The extracting unit 23 may extract the maximum size information and theminimum size information of the transformation unit with respect to thevideo, from the transformation-unit hierarchical-structure information.In an embodiment, the maximum size information and the minimum sizeinformation of the transformation unit with respect to the video may beextracted from a sequence parameter set or a picture parameter set of avideo stream.

The extracting unit 23 may extract transformation-unit maximum splitinformation from the transformation-unit hierarchical-structureinformation. In an embodiment, the transformation-unit maximum splitinformation may be extracted from the sequence parameter set or thepicture parameter set, or may be extracted from a slice or parametersthat are set for each of regions.

In another embodiment, when the maximum split level of thetransformation unit is implicitly set in advance between encoding anddecoding systems, it is not required to separately extract thetransformation-unit maximum split information.

The decoding unit 25 may analyze a total number of allowable levels or atotal number of allowable splits from the base transformation unit to alowermost-level transformation unit of the current region.

The decoding unit 25 may read a maximum split level of a transformationunit which is set with respect to a picture sequence of the video.Alternatively, the maximum split level of the transformation unit may beread according to various data levels such as pictures, slices, or dataunits.

In another embodiment, the transformation units in a variabletree-structure may be determined based on the maximum split level of thetransformation unit is implicitly set in advance between the encodingand decoding systems.

The extracting unit 23 may extract the transformation index informationfrom the transformation-unit hierarchical-structure information. Theextracting unit 23 may analyze a structure of the transformation unit,which is used in the transformation of the current region, from thetransformation index information.

For example, a total number of splits from the current region to thelowermost-level transformation unit, a size of the transformation unit,and a shape of the transformation unit may be extracted from thetransformation index information. When a transformation unit at an upperlevel is split into transformation units having the same size at everylevel, according to the transformation index information, the totalnumber of splits from the current region to the lowermost-leveltransformation unit may be read.

The extracting unit 23 may extract transformation-unit sub-splitinformation for each of transformation units that are determined withrespect to the current region. The decoding unit 25 may determinewhether to split a transformation unit at a current level intotransformation units at a next lower level, based on thetransformation-unit sub-split information. When the transformation-unitsub-split information is no longer extracted with respect to atransformation unit at a predetermined level, the transformation unit atthe predetermined level may be analyzed as a minimum-size transformationunit that is allowed with respect to the current region. The extractingunit 23 may extract hierarchical transformation-units patterninformation from each of transformation units that are determined withrespect to the current region. The decoding unit 25 may analyzeexistence of a transformation unit that includes a non-zero coefficientand that is from among transformation units at a lower level of acurrent transformation unit, from the hierarchical transformation-unitspattern information.

In an embodiment, transformation units required for theinverse-transformation may be analyzed from transformation units in ahierarchical structure which are uniformly split into transformationunits having a constant size at every level from an uppermost-leveltransformation unit of the current region to a predetermined splitlevel, based on the transformation-unit hierarchical-structureinformation. In another embodiment, whether to split a transformationunit at an upper level into transformation units at a lower level isseparately determined, transformation units at a transformation levelthat is determined to be required for the inverse-transformation basedon the transformation-unit hierarchical-structure information are notlimited to transformation units having a constant size.

Thus, the decoding unit 25 may perform the inverse-transformation on thecurrent region by using the transformation units that are determinedbased on transformation-unit related information extracted by theextracting unit 23.

In particular, the decoding unit 25 may analyze the transformation unitsin a variable tree-structure which are allowed with respect to thecurrent region, based on the maximum split level of the transformationunit with respect to the current region which is determined based on thetransformation-unit maximum split information, and may detecttransformation units that are to be used in inverse-transformation of atransform coefficient and that are determined from among thetransformation units in a variable tree-structure. The decoding unit 25may perform the inverse-transformation on the current region by usingthe transformation units that are detected based on the maximum splitlevel.

The decoding unit 25 may perform decoding on each of images configuringa predetermined region of the video, based on information about acorresponding encoding mode and the transformation-unit relatedinformation, and thus may decode the video.

In a video encoding and decoding procedure, the video encoding apparatus10 and the video decoding apparatus 20 may perform the transformationand the inverse-transformation by using tree-structure transformationunits having various sizes and shapes, so that the video encodingapparatus 10 and the video decoding apparatus 20 may efficiently encodeand decode a video, in consideration of an image characteristic.

Also, since the encoding and the decoding are performed by using thetransformation based on the transformation unit in a variabletree-structure from among transformation units in a tree structure, anencoding and decoding procedure using transformation units at a levelthat is not required according to the image characteristic and anencoding characteristic may be skipped, so that a calculation amount maybe reduced.

Also, the maximum total number of splits or the total number of levelsof the transformation unit, which is allowed with respect to the currentregion, may be predicted based on the maximum split level, so that it ispossible to reduce a transmission amount with respect to informationincluding the transformation-unit sub-split information which isrequired in determination of the transformation units to be used in thevideo decoding.

FIG. 3 illustrates a hierarchy model of a transformation unit in a treestructure, according to an exemplary embodiment.

The transformation unit in a tree structure which is to be used inencoding of a current video, by the video encoding apparatus 10 and thevideo decoding apparatus 20, may be determined based on a maximum sizeand a minimum size of a transformation unit which are allowed in thecurrent video.

The video encoding apparatus 10 may include maximum size information‘MaxTransformSize’ and minimum size information ‘MinTransformSize’ ofthe transformation unit which is allowed in the current video in asequence parameter set or a picture parameter set and may output them.

For example, when the maximum size information ‘MaxTransformSize’ andthe minimum size information ‘MinTransformSize’ of the transformationunit indicate 32×32 and 4×4, respectively, transformation units withrespect to a 64×64-size region (i.e., a coding unit (CU) 30) may include32×32-size transformation units 35 a, 35 b, 35 c, and 35 d through4×4-size transformation units 38 a and 38 b.

For convenience of description, a hierarchical relation oftransformation units is assumed, in which a height and a width of acurrent transformation unit are halved so that four transformation unitsat a next lower level are generated from the current transformationunit. Since the maximum size of the transformation unit which is allowedin the current video is 32×32, a size of a transformation unit at azero-level that is an uppermost level may be 32×32, a size of atransformation unit at a first level may be 16×16, a size of atransformation unit at a second level may be 8×8, and a size of atransformation unit at a third level may be 4×4.

In more detail, the 32×32-size transformation units 35 a, 35 b, 35 c,and 35 d at the zero-level may be split into 16×16-size transformationunits 36 a, 36 b, 36 c, 36 d, 36 e, 36 h, 36 i, 36 l, 36 m, and 36 p atthe first level. Also, the 16×16-size transformation units 36 a, 36 b,36 c, 36 d, 36 e, 36 h, 36 i, 36 l, 36 m, and 36 p at the first levelmay be split into 8×8-size transformation units 37 a, 37 b, 37 c, 37 d,37 e, and 37 f at the second level. Also, the 8×8-size transformationunits 37 a, 37 b, 37 c, 37 d, 37 e, and 37 f at the second level may besplit into the 4×4-size transformation units 38 a and 38 b at the thirdlevel.

Due to limitation in space, all available transformation units withrespect to the transformation units 36 a, 36 b, 36 c, 36 d, 36 e, 36 h,36 i, 36 l, 36 m, and 36 p at the first level, the transformation units37 a, 37 b, 37 c, 37 d, 37 e, and 37 f at the second level, and thetransformation units 38 a and 38 b at the third level are notillustrated, but, four transformation units at a next lower level may begenerated from the current transformation unit.

In more detail, a total number of transformation units according tolevels which may be used in transformation of a current region (i.e.,the CU 30) may be 4 transformation units including the transformationunits 35 a, 35 b, 35 c, and 35 d at the zero-level, 16 transformationunits including the transformation units 36 a, 36 b, 36 c, 36 d, 36 e,36 h, 36 i, 36 l, 36 m, and 36 p at the first level, 64 transformationunits including the transformation units 37 a, 37 b, 37 c, 37 d, 37 e,and 37 f at the second level, and 256 transformation units including thetransformation units 38 a and 38 b at the third level.

In order to determine transformation units in a tree structure withrespect to the current region 30, the video encoding apparatus 10 mayrepeatedly perform transformation on the current region 30 by using the32×32-size transformation units 35 a, 35 b, 35 c, and 35 d, the16×16-size transformation units 36 a, 36 b, 36 c, 36 d, 36 e, 36 h, 36i, 36 l, 36 m, and 36 p, the 8×8-size transformation units 37 a, 37 b,37 c, 37 d, 37 e, and 37 f, and the 4×4-size transformation units 38 aand 38 b which are allowed in the current video.

After the video encoding apparatus 10 performs the transformation withrespect to all transformation units at the zero, first, second, andthird levels, the video encoding apparatus 10 may independently select atransformation unit for each of inner regions of the current region 30,wherein the transformation unit is at a level from which a transformcoefficient with a minimum error is output. In an embodiment, thetransformation units in a tree structure may include the transformationunits at the selected level.

In order to encode information about the transformation units in a treestructure of the current region 30, the video encoding apparatus 10 mayencode and output transformation depth information about transformationdepths indicating levels of transformation units from which transformcoefficients with the minimum error are generated.

The video decoding apparatus 20 may read the levels of thetransformation units used to output the transform coefficients of thecurrent region 30, by using the transformation depth informationextracted from a bitstream, and may determine transformation units in atree structure for inverse-transformation of the transform coefficientsof the current region 30.

FIG. 4 illustrates a hierarchy model of a transformation unit in avariable tree-structure, according to an exemplary embodiment.

The video encoding apparatus 10 may output maximum split information‘MaxTuDepth’ of a transformation unit of a current region along withmaximum size information ‘MaxTransformSize’ and minimum size information‘MinTransformSize’ of the transformation unit which is allowed in thecurrent video.

The maximum split information of the transformation unit of the currentregion may indicate a maximum transformation level, i.e., a total numberof allowable levels of transformation units with respect to the currentregion. With respect to a current region 40 of the current region,transformation units from a base transformation unit at an uppermostlevel to transformation units at a lowermost level that is the maximumtransformation level may be allowed.

For example, the maximum transformation level with respect to thecurrent region may be set as 2.

The base transformation unit may include 32×32-size transformation units45 a, 45 b, 45 c, and 45 d at a zero-level.

Accordingly, transformation units with respect to the current region 40having a size of 64×64 may include the 32×32-size transformation units45 a, 45 b, 45 c, and 45 d at the zero-level and 16×16-sizetransformation units 46 a, 46 b, 46 c, 46 d, 46 e, 46 h, 46 i, 46 l, 46m, and 46 p at a first level.

Based on the maximum size information ‘MaxTransformSize’ and the minimumsize information ‘MinTransformSize’ of the transformation unit which isallowed in the current video, and the maximum split information‘MaxTuDepth’ of the transformation unit of the current region, a minimumsize of a transformation unit which may be used in the current regionmay be calculated by using Equation 1.

Minimum possible leaf Tusize=max(MinTransformSize,RootTUSize/(2̂(MaxTuDepth−1)))  [Equation 1]

That is, the minimum size ‘Minimum possible leaf TU size’ of thetransformation unit of the current region may be a larger one from amongthe minimum size information ‘MinTransformSize’ of the transformationunit which is allowed in the current video, and a sizeRootTUSize/(2̂(MaxTuDepth−1)) of a transformation unit at a lowermostlevel which is obtained by splitting the base transformation unit by amaximum total number of splits.

In Equation 1, a range of ‘MaxTuDepth−1’ corresponding to the maximumtotal number of splits satisfies Equation 2.

MaxTuDepth−1≦Log 2(MaxTransformSize)−Log 2(MinTransformSize)  [Equation2]

That is, the maximum total number of splits may be equal to or less thana total number of splits from a maximum transformation unit to a minimumtransformation unit which are determined based on the maximum sizeinformation ‘MaxTransformSize’ and the minimum size information‘MinTransformSize’ of the transformation unit which is allowed in thecurrent video.

A total number of transformation units according to levels which may beused to perform transformation on the current region 40 may be fourtransformation units 45 a, 45 b, 45 c, and 45 d at the zero-level and 16transformation units 46 a, 46 b, 46 c, 46 d, 46 e, 46 h, 46 i, 46 l, 46m, and 46 p at the first level.

Thus, although all transformation units at the zero, first, second, andthird levels may be usable according to the maximum size information andthe minimum size information of the transformation unit with respect tothe current video, the video encoding apparatus 10 may performtransformation on the current region 40 by using only the transformationunits at the first and second levels, based on the maximum split levelor the maximum total number of splits which is set with respect to thecurrent region 40.

That is, as described above, with respect to the current region 30 ofFIG. 3, the transformation is performed by using the 4 transformationunits at the zero-level, the 16 transformation units at the first level,the 64 transformation units at the second level, and the 256transformation units at the third level, based on the maximum sizeinformation and the minimum size information of the transformation unitwith respect to the current video. In contrast, with respect to thecurrent region 40 of FIG. 4, the transformation may be performed byusing only 4 transformation units at the zero level and 16transformation units at the first level, based on the maximum totalnumber of splits or the maximum split level of the transformation unit.

Also, the video encoding apparatus 10 may encode transformation-unitsub-split information for each transformation unit which indicateswhether a corresponding transformation unit is split into transformationunits at a next lower level and then may output it. Since atransformation unit having a minimum size is no longer split intotransformation units at a next lower level, the transformation-unitsub-split information is not required to be encoded with respect to thetransformation unit at a lowermost level.

Thus, with respect to the current region 30 of FIG. 3, thetransformation-unit sub-split information may be encoded with respect tothe 4 transformation units at the zero-level, the 16 transformationunits at the first level, and the 64 transformation units at the secondlevel. In contrast, with respect to the current region 40 of FIG. 4, thetransformation-unit sub-split information is encoded with respect toonly the 4 transformation units at the zero-level, based on the maximumtotal number of splits or the maximum split level of the transformationunit.

Also, as described above, the maximum total number of splits of thetransformation unit may be equal to or less than a total number ofsplits from a maximum transformation unit to a minimum transformationunit which respectively correspond to a maximum size and a minimum sizewhich are allowed for a video, and the maximum split level of thetransformation unit may be predicted according to a result thereof. Inthis manner, based on the predictability of the maximum split level,bits of maximum split information may be reduced.

For example, when the maximum split information is encoded according toa Truncated Unary Max Coding scheme, the total number of splits from themaximum transformation unit to the minimum transformation unit which areallowed for the video is set as a maximum value of the maximum splitlevel, so that, when the maximum split level corresponding to themaximum value is encoded, one bit may be reduced.

As a result of comparison between the transformation units in a treestructure of FIG. 3 and the transformation units in a variabletree-structure of FIG. 4, since a total number of transformation-unitlevels that are usable for the transformation is changed according tothe maximum split level or the maximum total number of splits, ahierarchical structure of the transformation unit is changed. The videoencoding apparatus 10 may perform transformation on each of regions ofthe current region 40 by using the transformation units in a variabletree-structure, and according to a result of the transformation, thevideo encoding apparatus 10 may independently select a transformationunit for each of the regions, wherein the transformation unit is at alevel from which transform coefficients with a minimum error are output.

The video encoding apparatus 10 may encode and output transformationdepth information and transformation-unit maximum split informationwhich are required for the video encoding apparatus 10 to determine thetransformation units in a variable tree-structure of the current region40.

The video decoding apparatus 20 may read a transformation depth of thetransformation units and the maximum split level of the transformationunit which are used in encoding of the current region 40, by using thetransformation depth information and the transformation-unit maximumsplit information extracted from the bitstream. Based on the readtransformation depth or level, the transformation units in a variabletree-structure which are used to inverse-transform the transformcoefficients of the current region 40 may be determined.

The maximum total number of splits or the maximum split level of thetransformation unit may be determined according to a characteristic ofthe current region. Thus, according to an image characteristic, if it isnot required to perform transformation by using various types of atransformation unit, video encoding and decoding are performed by usingthe transformation units in a variable tree-structure, so that it ispossible to reduce a calculation amount caused by performing atransformation by using transformation units with various levels andsizes. Also, since a hierarchical structure of available transformationunits may be predicted based on the maximum split level of thetransformation unit, bitrates for coding information related to thehierarchical structure of the transformation units may be reduced, sothat a transmission efficiency of an encoding result may be improved.

With reference to FIGS. 3 and 4, the embodiments in which a height and awidth of a transformation unit are halved and split into transformationunits at a lower level are described. However, the transformation unitsin a hierarchical structure are not limited to the embodiments of FIGS.3 and 4, and thus, in other embodiments, at least one of the height andthe width of the transformation unit may be split according to anarbitrary ratio, so that the transformation units at a lower level maybe generated.

FIGS. 5 through 8 illustrate base transformation units, according tovarious aspects of exemplary embodiments.

In an exemplary embodiment, transformation units in a variabletree-structure include transformation units at lower levels which aresplit from a base transformation unit, so that a shape and a size of thetransformation units in the variable tree-structure may be determinedaccording to a shape or a size of the base transformation unit.

Basically, the size of the base transformation unit is equal to or lessthan a maximum transformation unit with respect to a current video.Based on one of encoding modes of a region, a shape of a basetransformation unit of the region may be determined.

For example, a shape of a base transformation unit of a current regionmay be determined according to a prediction mode from among the encodingmodes of the region. For example, a size of the base transformation unitmay be determined based on whether the prediction mode of the currentregion is an inter mode or an intra mode.

For example, the shape of the base transformation unit of the currentregion may be determined according to a size of a partition from amongthe encoding modes of the region. The partition indicates a data unitobtained by splitting the region so as to perform an inter prediction oran intra prediction on the region, and the size of the partition mayindicate a shape or the size of the partition.

Referring to FIG. 5, a base transformation unit having the same shape asa data unit for prediction of a region may be determined. For example, a2N×2N-size partition 51 with respect to a 2N×2N-size region 50 is a dataunit for an inter prediction or an intra prediction, and a basetransformation unit of the 2N×2N-size region 50 may be determined as a2N×2N-size transformation unit.

In another embodiment, a base transformation unit 55 may be determinedas a transformation unit having a size equal to or less than a size ofpartitions of a region. In this case, since the base transformation unitis included in a partition positioned in a corresponding region, thebase transformation unit may be determined not to span a boundarybetween partitions of a current region.

Referring to FIG. 6, when N×2N-size partitions 61 a and 61 b aredetermined with respect to a 2N×2N-size region 60, 2N×2N-size basetransformation units 65 a, 65 b, 65 c and 65 d may be determined withrespect to the 2N×2N-size region 60. The 2N×2N-size base transformationunits 65 a, 65 b, 65 c and 65 d are less than the N×2N-size partitions61 a and 61 b, so that the 2N×2N-size base transformation units 65 a, 65b, 65 c and 65 d are included in the N×2N-size partitions 61 a and 61 band do not cross a boundary between the N×2N-size partitions 61 a and 61b.

Referring to FIG. 7, partitions 71 a and 71 b of which widths areasymmetrically split may be determined with respect to a 4M×4M-sizeregion 70. That is, the M×4M-size partition 71 a and the 3M×4M-sizepartition 71 b may be determined with respect to the 4M×4M-size region70. In this case, base transformation units with respect to the4M×4M-size region 70 may be determined as M×M-size transformation units75 a, 75 b, 75 c, 75 d, 75 e, 75 f, 75 g and 75 h, and 2M×2M-sizetransformation units 75 i and 75 j so as not to span a boundary betweenthe partitions 71 a and 71 b. The M×M-size transformation units 75 a, 75b, 75 c, 75 d, 75 e, 75 f, 75 g and 75 h, and the 2M×2M-sizetransformation units 75 i and 75 j may be included in the partition 71 aor 71 b of a corresponding region.

Also, it is possible to limit a size of base transformation units to beconstant with respect to a current region. Referring to FIG. 8, anM×4M-size partition 81 a and a 3M×4M-size partition 81 b may bedetermined with respect to a 4M×4M-size region 80. In this case,M×M-size transformation units 85 a, 85 b, 85 c, 85 d, 85 e, 85 f, 85 g,85 h, 85 i, 85 j, 85 k, 851, 85 m, 85 n, 85 o, and 85 p that do not spana boundary between the partitions 81 a and 81 b and that have a constantsize may be determined with respect to the 4M×4M-size region 80.

In an embodiment, a maximum split level may be separately determined foreach of the encoding modes of the region.

The maximum split level may be separately determined for each predictionmode of the region. For example, the maximum split level may beseparately determined for each prediction mode in a manner that maximumsplit information ‘MaxTUDepthOfInter’ is determined for a region with aninter mode or maximum split information ‘MaxTUDepthOfIntra’ isdetermined for a region with an intra mode, or the like.

The maximum split level may be separately determined for each slicetype. For example, the maximum split level may be separately determinedfor each slice type in a manner that a maximum split level value‘MaxTUDepthOfIntraSlice’ is determined for an intra-type slice, amaximum split level value ‘MaxTUDepthOfInterP’ is determined for aninter P-type slice, a maximum split level value ‘MaxTUDepthOfInterB’ isdetermined for an inter B-type slice, or the like. In this case, a sliceheader may be encoded while including maximum split information for eachslice type.

FIGS. 9 and 10 illustrate transformation units in a variabletree-structure, according to various aspects of exemplary embodiments.

The transformation units in a variable tree-structure may include a basetransformation unit and transformation units that are split from thebase transformation unit and that have levels lower than the basetransformation unit by at least one level. For example, the basetransformation unit is irrelevant to a partition size, but, thetransformation units at lower levels which are split from the basetransformation unit may be determined based on the partition size.

For example, referring to FIG. 9, a partition type of a 2N×2N-sizeregion 90 may be determined as N×2N-size partitions 91 a and 91 b.Regardless of a size of the N×2N-size partitions 91 a and 91 b, a sizeof a base transformation unit 95 at a zero level may be determined as a2N×2N size that is the same as the 2N×2N-size region 90. Transformationunits 97 a, 97 b, 97 c and 97 d at a first level that is one-level lowerfrom the base transformation unit 95 may be determined as N×N-sizetransformation units that do not span a boundary between the N×2N-sizepartitions 91 a and 91 b and that are smaller than the N×2N-sizepartitions 91 a and 91 b.

Referring to FIG. 10, a partition type of a 4M×4M-size region 92 may bedetermined as partitions 93 a and 93 b that are an asymmetricalpartition type. Regardless of sizes of the partitions 93 a and 93 b, asize of a base transformation unit 94 at a zero level may be determinedas 4M×4M that is equal to the 4M×4M-size region 92.

In an embodiment, transformation units at a first level that isone-level lower from the base transformation unit 94 at the zero levelmay be determined as M×M-size transformation units 96 a, 96 b, 96 c, 96d, 96 e, 96 f, 96 g, and 96 h, and 2M×2M-size transformation units 96 iand 96 j so as not to span a boundary between the partitions 93 a and 93b.

In another embodiment, the transformation units at the first level thatis one-level lower from the base transformation unit 94 at the zerolevel may be determined as M×M-size transformation units 98 a, 98 b, 98c, 98 d, 98 e, 98 f, 98 g, 98 h, 98 i, 98 j, 98 k, 981, 98 m, 98 n, 98o, and 98 p so as to have a constant size while they do not cross theboundary between the partitions 93 a and 93 b.

With reference to FIGS. 5 through 8, the base transformation unitsaccording to various aspects of exemplary embodiments are describedabove, and with reference to FIGS. 9 and 10, the transformation units ina variable tree-structure according to various aspects of exemplaryembodiments. While the aforementioned transformation units aresquare-shaped data units obtained by halving a height and a width of atransformation unit at an upper level, a shape of the transformationunits is not limited to the square-shaped data unit.

FIG. 11 is a flowchart of a video encoding method using transformationunits in a variable tree-structure, according to an exemplaryembodiment.

In operation 111, a video is divided into a plurality of regions andthen each of the regions is encoded. In order to encode a current regionhaving a predetermined size in the video, transformation may beperformed on the current region based on transformation units in avariable tree-structure which are generated based on a maximum splitlevel of a transformation unit from among transformation units that arehierarchically split from a base transformation unit of the currentregion. The current region may be a data unit, a macroblock, a picture,a slice, or the like which are for an encoding operation.

The base transformation unit of the current region unit may be amaximum-size and uppermost-level transformation unit that is usable withrespect to the current region. A size of the base transformation unitmay be equal to or less than a maximum size of a transformation unitwith respect to the video.

The maximum split level of the transformation unit may indicate a totalnumber of levels of the transformation unit that is allowed with respectto the current region and may correspond to a total number of splitsfrom the base transformation unit of the current region to atransformation unit at a lowermost level which is allowed with respectto the current region.

The transformation units in a variable tree-structure may include thebase transformation unit according to the maximum split level of thetransformation unit, and transformation units according to levels thatare generated by being stepwise split from the base transformation unitto the maximum split level of the transformation unit.

The maximum split level of the transformation unit may be separatelydetermined for each of encoding modes including a prediction mode, aslice type, and the like which are used in encoding of the currentregion.

The base transformation unit with respect to the current region may bevariously set according to an image characteristic.

Based on the base transformation unit that may be variously set or themaximum split level that may be variously set, the transformation unitsin a variable tree-structure may be used in transformation with respectto the current region. Transformation units that cause a minimum errorand that are according to a result of an operation in which thetransformation is performed on the current region by using thetransformation units in a variable tree-structure may be determined astransformation units with a transformation depth with respect to thecurrent region, so that a transform coefficient may be output.

In operation 112, encoded data of the current region and informationabout an encoding mode that is determined in encoding of the currentregion are output in the form of a bitstream, wherein the encoded datais generated via the encoding that includes the transformation based onthe transformation unit determined in operation 111. Also, maximum sizeinformation and minimum size information of the transformation unit withrespect to the video, and transformation-unit maximum split informationindicating the maximum split level of the transformation unit are outputwhile included in the bitstream.

For each of transformation units that are from among transformationunits determined as a final transformation unit with respect to thecurrent region and that exclude a transformation unit having a minimumsize of the current region, transformation-unit sub-split informationindicating whether each of the transformation units is split intotransformation units at a next lower level may be encoded and may beoutput.

Also, for each of the transformation units, hierarchicaltransformation-units pattern information indicating existence of atransformation unit that includes a non-zero coefficient and that isfrom among transformation units at a lower level may be encoded and maybe output.

FIG. 12 is a flowchart of a video decoding method using transformationunits in a variable tree-structure, according to an exemplaryembodiment.

In operation 121, a bitstream including encoded data of a video isreceived.

In operation 122, the bitstream received in operation 121 is parsed, sothat encoded data of a current region and information about an encodingmode that is determined in encoding of the current region are extractedfrom the bitstream.

Also, maximum size information and minimum size information of atransformation unit with respect to the video, and transformation-unitmaximum split information are extracted from the bitstream. Thetransformation-unit maximum split information about a transformationunit with respect to the current region may be separately read for eachprediction mode or each slice type which is used in encoding of thecurrent region.

Transformation-unit sub-split information or hierarchicaltransformation-units pattern information may be extracted from thebitstream.

In operation 123, the encoding mode of the current region may be readfrom the extracted information about the encoding mode, and the encodeddata of the current region may be decoded based on the encoding mode.

In particular, a maximum split level of the transformation unit withrespect to the current region may be read based on thetransformation-unit maximum split information. The transformation unitsin a variable tree-structure may be determined based on the maximumsplit level, wherein the transformation units in a variabletree-structure are generated based on the maximum split level of thetransformation unit and are determined from among transformation unitsthat are hierarchically split from a base transformation unit withrespect to the current region. A transformation unit with atransformation depth may be determined from among the transformationunits in a variable tree-structure, and inverse-transformation may beperformed on a transform coefficient of the current region by using thetransformation unit with the transformation depth. Afterward, the videomay be restored by combining encoded results with respect to images.

A maximum total number of splits or the maximum split level of thetransformation unit may be separately determined according to aspatial-domain characteristic of an image. The maximum total number ofsplits or the maximum split level of the transformation unit may bedetermined based on a capability or a data communication environment ofan encoding system or a decoding system. Since the maximum total numberof splits or the maximum split level is selectively limited from thebase transformation unit, an encoding calculation amount and atransmission bit amount may be reduced.

Hereinafter, with reference to FIGS. 13 through 27, a video encodingapparatus and a video decoding apparatus, and a video encoding methodand a video decoding method, which use a transformation unit in a treestructure and a transformation unit in a variable tree-structure, willbe described.

FIG. 13 is a block diagram of a video encoding apparatus usingtransformation unit in tree structure and transformation unit invariable tree-structure 100, according to an exemplary embodiment.

The video encoding apparatus using transformation unit in tree structureand transformation unit in variable tree-structure 100 includes amaximum coding unit splitter 110, a coding unit determiner 120, and anoutput unit 130. Hereinafter, for convenience of description, the videoencoding apparatus using transformation unit in variable tree-structureand transformation unit in variable tree-structure 100 is referred to as‘video encoding apparatus 100’.

The maximum coding unit splitter 110 may split a current picture basedon a maximum coding unit for the current picture of an image. If thecurrent picture is larger than the maximum coding unit, image data ofthe current picture may be split into the at least one maximum codingunit. The maximum coding unit may be a data unit having a size of 32×32,64×64, 128×128, 256×256, etc., wherein a shape of the data unit is asquare having a width and height in squares of 2. The image data may beoutput to the coding unit determiner 120 according to the at least onemaximum coding unit.

A coding unit may be characterized by a maximum size and a depth. Thedepth denotes a number of times the coding unit is spatially split fromthe maximum coding unit. Accordingly, as the depth increases, deeperencoding units according to depths may be split from the maximum codingunit to a minimum coding unit. A depth of the maximum coding unit is anuppermost depth and a depth of the minimum coding unit is a lowermostdepth. Since a size of a coding unit corresponding to each depthdecreases as the depth of the maximum coding unit increases, a codingunit corresponding to an upper depth may include a plurality of codingunits corresponding to lower depths.

As described above, the image data of the current picture is split intoone or more maximum coding units according to a maximum size of thecoding unit, and each of the maximum coding units may include deepercoding units that are split according to depths. Since the maximumcoding unit is split according to depths, the image data of a spatialdomain included in the maximum coding unit may be hierarchicallyclassified according to depths.

A maximum depth and a maximum size of a coding unit, which limit thetotal number of times a height and a width of the maximum coding unitare hierarchically split may be predetermined.

The coding unit determiner 120 encodes at least one split regionobtained by splitting a region of the maximum coding unit according todepths, and determines a depth to output a finally encoded image dataaccording to the at least one split region. The coding unit determiner120 encodes at least one split region obtained by splitting a region ofthe maximum coding unit according to depths, and determines a depth tooutput a finally encoded image data according to the at least one splitregion. For example, the coding unit determiner 120 determines a codeddepth by encoding the image data in the deeper coding units according todepths, according to the maximum coding unit of the current picture, andselecting a depth having the least encoding errors. For example, thecoding unit determiner 120 determines a coded depth by encoding theimage data in the deeper coding units according to depths, according tothe maximum coding unit of the current picture, and selecting a depthhaving the least encoding errors. Thus, the encoded image data of thecoding unit corresponding to the determined coded depth is output by thecoding unit determiner 120. Thus, the encoded image data of the codingunit corresponding to the determined coded depth is output by the codingunit determiner 120. Also, the coding units corresponding to the codeddepth may be regarded as encoded coding units. Also, the coding unitscorresponding to the coded depth may be regarded as encoded codingunits.

The determined coded depth and the encoded image data according to thedetermined coded depth are output to the output unit 130.

The image data in the maximum coding unit is encoded based on the deepercoding units corresponding to at least one depth equal to or below themaximum depth, and results of encoding the image data are compared basedon each of the deeper coding units. A depth having the least encodingerrors may be selected after comparing encoding errors of the deepercoding units. At least one coded depth may be selected for each maximumcoding unit.

The size of the maximum coding unit is split as a coding unit ishierarchically split according to depths, and as the number of codingunits increases. Also, even if coding units correspond to the same depthin one maximum coding unit, it is determined whether to split each ofthe coding units corresponding to the same depth to a lower depth bymeasuring an encoding error of the image data of each coding unit,separately. Accordingly, even when image data is included in one maximumcoding unit, the image data is split to regions according to the depthsand the encoding errors may differ according to regions in the onemaximum coding unit. Thus, the coded depths may differ according toregions in the image data. Therefore, one or more coded depths may bedetermined in one maximum coding unit, and the image data of the maximumcoding unit may be divided according to coding units of at least onecoded depth.

Accordingly, the coding unit determiner 120 may determine coding unitshaving a tree structure included in the maximum coding unit. The codingunits having a tree structure include coding units corresponding to adepth determined to be the coded depth, from among all deeper codingunits included in the maximum coding unit. A coding unit of a codeddepth may be hierarchically determined according to depths in the sameregion of the maximum coding unit, and may be independently determinedin different regions. Similarly, a coded depth in a current region maybe independently determined from a coded depth in another region.

A maximum depth is an index related to a number of splitting times froma maximum coding unit to a minimum coding unit. A first maximum depthmay denote a total number of splitting times from the maximum codingunit to the minimum coding unit. A second maximum depth may denote atotal number of depth levels from the maximum coding unit to the minimumcoding unit. For example, when a depth of the maximum coding unit is 0,a depth of a coding unit, in which the maximum coding unit is splitonce, may be set to 1, and a depth of a coding unit, in which themaximum coding unit is split twice, may be set to 2. Here, if theminimum coding unit is a coding unit in which the maximum coding unit issplit four times, 5 depth levels of depths 0, 1, 2, 3 and 4 exist. Inthis case, the first maximum depth may be set to 4, and the secondmaximum depth may be set to 5.

Prediction encoding and transformation may be performed according to themaximum coding unit. The prediction encoding and the transformation mayalso be performed based on the deeper coding units according to a depthequal to, or depths less than, the maximum depth, according to themaximum coding unit. Transformation may be performed according to amethod of orthogonal transformation or integer transformation.

Since the number of deeper coding units increases whenever the maximumcoding unit is split according to depths, encoding including theprediction encoding and the transformation may be performed on all ofthe deeper coding units generated as the depth increases. Forconvenience of description, the prediction encoding and thetransformation will now be described based on a coding unit of a currentdepth, in a maximum coding unit.

The video encoding apparatus 100 may variously select a size or shape ofa data unit for encoding the image data. In order to encode the imagedata, operations, such as prediction encoding, transformation, andentropy encoding, are performed, and at this time, the same data unitmay be used for all operations or different data units may be used foreach operation.

For example, the video encoding apparatus 100 may select not only acoding unit for encoding the image data, but also a data unit differentfrom the coding unit so as to perform the prediction encoding on theimage data in the coding unit.

In order to perform the prediction encoding in the maximum coding unit,the prediction encoding may be performed based on a coding unitcorresponding to a coded depth, i.e., based on a coding unit that is nolonger split to coding units corresponding to a lower depth.Hereinafter, the coding unit that is no longer split and becomes a basisunit for the prediction encoding will now be referred to as a predictionunit. A partition obtained by splitting the prediction unit may includea prediction unit or a data unit obtained by splitting at least one of aheight and a width of the prediction unit.

For example, when a coding unit of a size of 2N×2N (where N is apositive integer) is no longer split and becomes a prediction unit of2N×2N, a size of a partition may be 2N×2N, 2N×N, N×2N, or N×N. Examplesof a partition type include symmetrical partitions that are obtained bysymmetrically splitting a height or a width of the prediction unit,partitions obtained by asymmetrically splitting the height or the widthof the prediction unit (such as 1:n or n:1), partitions that areobtained by geometrically splitting the prediction unit, and partitionshaving arbitrary shapes.

A prediction mode of the prediction unit may be at least one of an intramode, a inter mode, and a skip mode. For example, the intra mode or theinter mode may be performed on the partition of 2N×2N, 2N×N, N×2N, orN×N. Also, the skip mode may be performed only on the partition of2N×2N. The encoding is independently performed on prediction units in acoding unit, thereby selecting a prediction mode having a least encodingerror.

The video encoding apparatus 100 may also perform the transformation onthe image data in a coding unit based not only on the coding unit forencoding the image data, but also based on a data unit that is differentfrom the coding unit.

As described above with reference to FIGS. 1 through 12, in order toperform the transformation in the coding unit, the transformation may beperformed based on a data unit having a size equal to or less than thetransformation unit. For example, the transformation unit for thetransformation may include a transformation unit for an intra mode and atransformation unit for an inter mode.

Similar to the transformation units in a tree structure according to theprevious embodiments, the transformation unit in the coding unit may berecursively split into smaller sized transformation units, so thatresidual data in the coding unit may be divided according to thetransformation units in the tree structure according to transformationdepths.

A transformation depth indicating a number of splitting times to reachthe transformation unit by splitting a height and a width of the codingunit may also be set for the transformation unit. For example, in acurrent coding unit of 2N×2N, a transformation depth may be 0 when asize of a transformation unit is 2N×2N, the transformation depth may be1 when the size of the transformation unit is N×N, and thetransformation depth may be 2 when the size of the transformation unitis N/2×N/2. In other words, the transformation unit in the treestructure may be set for the transformation unit according to atransformation depth.

Encoding information according to coding units corresponding to a codeddepth uses not only information about the coded depth, but alsoinformation about information related to prediction encoding andtransformation. Accordingly, the coding unit determiner 120 maydetermine a coded depth having a minimum encoding error and may alsodetermine a partition type in a prediction unit, a prediction modeaccording to prediction units, and a size of a transformation unit fortransformation.

Also, the coding unit determiner 120 may perform the transformation byusing the transformation units in a variable tree-structure in a codingprocess with respect to the coding unit, based on a maximum split levelof the transformation unit which is limitedly set in advance for each ofa maximum coding unit or the current coding unit.

The transformation unit in the variable tree-structure based on themaximum split level of the transformation unit corresponds to theaforementioned description with reference to FIGS. 1 through 12. Thatis, the transformation unit in the variable tree-structure may include abase transformation unit, and transformation units at lower levels whichare split from the base transformation unit to the maximum split levelthat is allowed for the coding unit.

The base transformation unit and the maximum split level may bevariously set according to encoding modes. For example, a shape of abase transformation unit of a current image may be determined accordingto a size of a partition or a prediction mode from among the encodingmodes of the coding unit.

The partition may indicate a data unit obtained by splitting aprediction unit of the coding unit, and the prediction unit may be apartition having the same size as the coding unit. In an embodiment, thebase transformation unit may be determined to have the same shape as theprediction unit of the coding unit. In another embodiment, the basetransformation unit may be determined to have a size equal to or lessthan a size of partitions so as not to span a boundary between thepartitions.

Also, while the base transformation unit is larger than the partition,transformation units at lower levels than the base transformation unitmay be determined to have a size less than the size of the partitions soas not to span the boundary between the partitions.

The coding unit determiner 120 may perform the transformation on each ofthe coding units by using the transformation units in the variabletree-structure and thus may determine the transformation units in thetree structure.

Coding units according to a tree structure in a maximum coding unit anda method of determining a partition and a transformation unit in a treestructure, according to one or more embodiments, will be described indetail later with reference to FIGS. 15 through 25.

The coding unit determiner 120 may measure an encoding error of deepercoding units according to depths by using Rate-Distortion Optimizationbased on Lagrangian multipliers.

The output unit 130 outputs the image data of the maximum coding unit,which is encoded based on the at least one coded depth determined by thecoding unit determiner 120, and information about the encoding modeaccording to the coded depth, in bitstreams.

The encoded image data may be obtained by encoding residual data of animage.

The information about the encoding mode according to coded depth mayinclude at least one of information about the coded depth, informationabout the partition type in the prediction unit, the prediction mode,and the size of the transformation unit.

The information about the coded depth may be defined by using splitinformation according to depths, which indicates whether encoding isperformed on coding units of a lower depth instead of a current depth.If the current depth of the current coding unit is the coded depth,image data in the current coding unit is encoded and output, and thusthe split information may be defined not to split the current codingunit to a lower depth. Alternatively, if the current depth of thecurrent coding unit is not the coded depth, the encoding is performed onthe coding unit of the lower depth. Thus, the split information may bedefined to split the current coding unit to obtain the coding units ofthe lower depth.

If the current depth is not the coded depth, encoding is performed onthe coding unit that is split into the coding unit of the lower depth.Since at least one coding unit of the lower depth exists in one codingunit of the current depth, the encoding is repeatedly performed on eachcoding unit of the lower depth. Thus, the encoding may be recursivelyperformed for the coding units having the same depth.

Since the coding units having a tree structure are determined for onemaximum coding unit, and information about at least one encoding mode isdetermined for a coding unit of a coded depth, information about atleast one encoding mode may be determined for one maximum coding unit.Also, a coded depth of the image data of the maximum coding unit may bedifferent according to locations since the image data is hierarchicallysplit according to depths. Thus, information about the coded depth andthe encoding mode may be set for the image data.

Accordingly, the output unit 130 may assign encoding information about acorresponding coded depth and an encoding mode to at least one of thecoding unit, the prediction unit, and a minimum unit included in themaximum coding unit.

The minimum unit may be a rectangular data unit obtained by splittingthe minimum coding unit having the lowermost depth by 4. Alternatively,the minimum unit may be a maximum-size rectangular data unit that may beincluded in all of the coding units, prediction units, partition units,and transformation units included in the maximum coding unit.

For example, the encoding information output through the output unit 130may be classified into encoding information according to coding units,and encoding information according to prediction units. The encodinginformation according to the coding units may include at least one ofinformation about the prediction mode and information about a size ofthe partitions. The encoding information according to the predictionunits may include at least one of information about an estimateddirection of an inter mode, information about a reference image index ofthe inter mode, information about a motion vector, information about achroma component of an intra mode, and information about aninterpolation method of the intra mode.

Information about a maximum size of the coding unit defined according topictures, slices, or groups of pictures (GOPs), and information about amaximum depth may be inserted into a header of a bitstream, a SequenceParameter Set (SPS) or a picture parameter set.

Also, maximum size information of the transformation unit and minimumsize information of the transformation unit which are allowed for thecurrent video may be output via the header of the bitstream, the SPS orthe picture parameter set. The output unit 130 may output thetransformation-unit maximum split information, the transformation indexinformation, the transformation-unit sub-split information, thehierarchical transformation-units pattern information, and the likewhich are described above with reference to FIGS. 1 through 12.

In the video encoding apparatus 100, the deeper coding unit may be acoding unit obtained by dividing at least one of a height and a width ofa coding unit of an upper depth, which is one level above, by two. Inother words, when the size of the coding unit of the current depth is2N×2N, the size of the coding unit of the lower depth may be N×N. Also,the coding unit of the current depth having the size of 2N×2N mayinclude 4 of the coding units of the lower depth.

Accordingly, the video encoding apparatus 100 may form the coding unitshaving the tree structure by determining coding units having an optimumshape and an optimum size for each maximum coding unit, based on thesize of the maximum coding unit and the maximum depth both determinedconsidering characteristics of the current picture. Also, since encodingmay be performed on each maximum coding unit by using any of variousprediction modes and transformations, an optimum encoding mode may bedetermined considering characteristics of the coding unit of variousimage sizes.

Thus, if an image having a high resolution or a large amount of data isencoded in units of macroblocks having a predetermined fixed size, anumber of macroblocks per picture excessively increases. Accordingly, anumber of pieces of compressed information generated for each macroblockincreases, and thus it is difficult to transmit the compressedinformation and data compression efficiency decreases. However, by usingthe video encoding apparatus 100, image compression efficiency may beincreased since a coding unit is adjusted while consideringcharacteristics of an image while increasing a maximum size of a codingunit while considering a size of the image.

The video encoding apparatus 100 of FIG. 13 may correspond to the videoencoding apparatus 10 described above with reference to FIG. 1.

That is, in the video encoding apparatus 10, a current region mayindicate a current coding unit that is one of coding units obtained bysplitting a current picture of a video so as to encode the video.

The transformation-unit determining unit 11 of the video encodingapparatus 10 may split the current picture into maximum coding units,may perform transformation on each of the maximum coding units based oncoding units according to depths, may select coding units with a codeddepth from which a coding result that generates a minimum error isoutput, and then may determine coding units in a tree structure.

When the transformation-unit determining unit 11 of the video encodingapparatus 10 performs the transformation based on the coding unit, thetransformation-unit determining unit 11 may perform the transformationbased on a transformation unit. In particular, transformation units in avariable tree-structure may be configured based on a maximum split levelof the transformation unit which is set the maximum coding unit or eachof current coding units.

The transformation-unit determining unit 11 of the video encodingapparatus 10 may perform the transformation on each of the coding units,based on the transformation unit in the variable tree-structure, andthus may determine a transformation depth that is a level of atransformation unit, and a coded depth of a coding unit, which cause anoptimal encoding result. Accordingly, the transformation-unitdetermining unit 11 may determine coding units in a tree structure andtransformation units in a variable tree-structure with respect to eachof the maximum coding units.

The output unit 13 of the video encoding apparatus 10 may output codeddata of a picture that is coded according to the coding units in thetree structure with respect to each of the maximum coding units, mayencode information about coded depths and encoding modes of the codingunits in the tree structure, may encode transformation-unit maximumsplit information, and may output them.

FIG. 14 is a block diagram of a video decoding apparatus usingtransformation unit in tree-structure and transformation unit invariable tree-structure 200, according to an exemplary embodiment.

The video decoding apparatus using transformation unit in tree-structureand transformation unit in variable tree-structure 200 includes areceiver 210, an image data and encoding information extractor 220, andan image data decoder 230. Hereinafter, for convenience of description,the video decoding apparatus using transformation unit in tree-structureand transformation unit in variable tree-structure 200 is referred to as‘video decoding apparatus 200’.

Definitions of various terms, such as a coding unit, a depth, aprediction unit, a transformation unit, and information about variousencoding modes, for various operations of the video decoding apparatus200 are the same or similar to those described above with reference toFIG. 13 and the video encoding apparatus 100.

The receiver 210 receives and parses a bitstream of an encoded video.The image data and encoding information extractor 220 extracts encodedimage data for each coding unit from the parsed bitstream, wherein thecoding units have a tree structure according to each maximum codingunit, and outputs the extracted image data to the image data decoder230. The image data and encoding information extractor 220 may extractinformation about a maximum size of a coding unit of a current picturefrom a header corresponding to the current picture, an SPS, or a pictureparameter set.

Also, the image data and encoding information extractor 220 extractsinformation about a coded depth and an encoding mode for the codingunits having a tree structure according to each maximum coding unit,from the parsed bitstream. The extracted information about the codeddepth and the encoding mode is output to the image data decoder 230.Thus, the image data in a bit stream is split into the maximum codingunit so that the image data decoder 230 decodes the image data for eachmaximum coding unit.

The information about the coded depth and the encoding mode according tothe maximum coding unit may be set for information about at least onecoding unit corresponding to the coded depth. Furthermore, theinformation about the encoding mode may include at least one ofinformation about a partition type of a corresponding coding unitcorresponding to the coded depth, information about a prediction mode,and a size of a transformation unit. Also, splitting informationaccording to depths may be extracted as the information about the codeddepth.

The information about the coded depth and the encoding mode according toeach maximum coding unit extracted by the image data and encodinginformation extractor 220 is information about a coded depth and anencoding mode determined to generate a minimum encoding error when anencoder, such as the video encoding apparatus 100, repeatedly performsencoding for each deeper coding unit according to depths according toeach maximum coding unit. Accordingly, the video decoding apparatus 200may restore an image by decoding the image data according to a codeddepth and an encoding mode that generates the minimum encoding error.

Also, the image data and encoding information extractor 220 may extractmaximum size information of a transformation unit and minimum sizeinformation of a transformation unit which are allowed for the currentvideo from the header of the bitstream, the SPS or the picture parameterset. The image data and encoding information extractor 220 may extractthe transformation-unit maximum split information, the transformationindex information, the transformation-unit sub-split information, thehierarchical transformation-units pattern information, and the like,which are related to the transformation unit described above withreference to FIGS. 1 through 12, as encoding information.

Since encoding information about the coded depth and the encoding modemay be assigned to a predetermined data unit from among a correspondingcoding unit, a prediction unit, and a minimum unit, the image data andencoding information extractor 220 may extract the information about thecoded depth and the encoding mode according to the predetermined dataunits. The predetermined data units to which the same information aboutthe coded depth and the encoding mode is assigned may be inferred to bethe data units included in the same maximum coding unit.

The image data decoder 230 restores the current picture by decoding theimage data in each maximum coding unit based on the information aboutthe coded depth and the encoding mode according to the maximum codingunits. In other words, the image data decoder 230 may decode the encodedimage data based on the extracted information about the partition type,the prediction mode, and the transformation unit for each coding unitfrom among the coding units having the tree structure included in eachmaximum coding unit. A decoding process may include at least one of aprediction including intra prediction and motion compensation, and aninverse-transformation. Inverse-transformation may be performedaccording to method of inverse orthogonal transformation or inverseinteger transformation.

The image data decoder 230 may perform intra prediction or motioncompensation according to a partition and a prediction mode of eachcoding unit, based on the information about the partition type and theprediction mode of the prediction unit of the coding unit according tocoded depths.

Also, in order to perform inverse-transformation according to themaximum coding units, the image data decoder 230 may read transformationunits in a tree structure including size information abouttransformation units of the coding units according to coded depths, andthen may perform the inverse-transformation on each of the coding units,based on the transformation unit.

The image data decoder 230 may determine the transformation units in thevariable tree-structure including allowable lower levels from a basetransformation unit, based on a maximum split level of a transformationunit with respect to each of the coding units. The image data decoder230 may determine transformation units with a transformation depth whichare required to perform inverse-transformation on transform coefficient,wherein the transformation units are determined from among thetransformation units in the variable tree-structure, may perform theinverse-transformation on the transform coefficient, and thus mayrestore a pixel value.

The image data decoder 230 may determine at least one coded depth of acurrent maximum coding unit by using split information according todepths. If the split information indicates that image data is no longersplit in the current depth, the current depth is a coded depth.Accordingly, the image data decoder 230 may decode encoded data of atleast one coding unit corresponding to each coded depth in the currentmaximum coding unit by using the information about the partition type ofthe prediction unit, the prediction mode, and the size of thetransformation unit for each coding unit corresponding to the codeddepth, and output the image data of the current maximum coding unit.

In other words, data units including the encoding information includingthe same split information may be gathered by observing the encodinginformation set assigned for the predetermined data unit from among thecoding unit, the prediction unit, and the minimum unit. Moreover, thegathered data units may be considered to be one data unit to be decodedby the image data decoder 230 in the same encoding mode.

The video decoding apparatus 200 may obtain information about at leastone coding unit that generates the minimum encoding error when encodingis recursively performed for each maximum coding unit, and may use theinformation to decode the current picture. In other words, the codingunits having the tree structure determined to be the optimum codingunits in each maximum coding unit may be decoded. Also, a maximum sizeof the coding unit may be determined considering resolution and anamount of image data.

Accordingly, even if image data has a high resolution and a large amountof data, the image data may be efficiently decoded and restored by usinga size of a coding unit and an encoding mode, which are adaptivelydetermined according to characteristics of the image data, by usinginformation about an optimum encoding mode received from an encoder.

The video decoding apparatus 200 of FIG. 14 may correspond to the videodecoding apparatus 20 described above with reference to FIG. 2.

That is, in the video decoding apparatus 20, a current region mayindicate a current coding unit that is one of coding units obtained bysplitting a current picture of a video so as to encode the video.

The extracting unit 23 of the video decoding apparatus 20 may extract,from a parsed bitstream, coded data of a picture that is coded accordingto the coding units in the tree structure which are included in each ofthe maximum coding units, and may extract information about coded depthsand encoding modes for each of the coding units. Also, the extractingunit 23 of the video decoding apparatus 20 may extracttransformation-unit maximum split information that is set for eachpicture, each slice, each maximum coding unit, or each coding unit.

The decoding unit 25 of the video decoding apparatus 20 may perform theinverse-transformation on each of the maximum coding units by using thetransformation units in the tree structure. In particular, the decodingunit 25 may perform the inverse-transformation by using transformationunits that are determined from among the transformation units in thevariable tree-structure which are configured based on thetransformation-unit maximum split information, may decode the encodeddata in each of the coding units, and thus may restore a picture.

FIG. 15 is a diagram for describing a concept of coding units accordingto an exemplary embodiment.

A size of a coding unit may be expressed in width×height, and may be64×64, 32×32, 16×16, and 8×8, though it is understood that anotherembodiment is not limited thereto. A coding unit of 64×64 may be splitinto partitions of 64×64, 64×32, 32×64, or 32×32, a coding unit of 32×32may be split into partitions of 32×32, 32×16, 16×32, or 16×16, a codingunit of 16×16 may be split into partitions of 16×16, 16×8, 8×16, or 8×8,and a coding unit of 8×8 may be split into partitions of 8×8, 8×4, 4×8,or 4×4.

Referring to FIG. 15, first video data 310 has a resolution of1920×1080, a maximum size of a coding unit of 64, and a maximum depth of2. Second video data 320 has a resolution of 1920×1080, a maximum sizeof a coding unit of 64, and a maximum depth of 3. Third video data 330has a resolution of 352×288, a maximum size of a coding unit of 16, anda maximum depth of 1. The maximum depth shown in FIG. 15 denotes a totalnumber of splits from a maximum coding unit to a minimum decoding unit.

If a resolution is high or a data amount is large, a maximum size of acoding unit may be large so as to not only increase encoding efficiencybut also to accurately reflect characteristics of an image. Accordingly,the maximum size of the coding units of the first and second video data310 and 320 having a higher resolution than the third video data 330 maybe 64.

Since the maximum depth of the first video data 310 is 2, coding units315 of the first video data 310 may include a maximum coding unit havinga long axis size of 64, and coding units having long axis sizes of 32and 16 since depths are deepened to two levels by splitting the maximumcoding unit twice. Meanwhile, since the maximum depth of the third videodata 330 is 1, coding units 335 of the third video data 330 may includea maximum coding unit having a long axis size of 16, and coding unitshaving a long axis size of 8 since depths are deepened to one level bysplitting the maximum coding unit once.

Since the maximum depth of the second video data 320 is 3, coding units325 of the second video data 320 may include a maximum coding unithaving a long axis size of 64, and coding units having long axis sizesof 32, 16, and 8 since the depths are deepened to 3 levels by splittingthe maximum coding unit three times. As a depth deepens (i.e.,increases), detailed information may be precisely expressed.

FIG. 16 is a block diagram of an image encoder 400 based on codingunits, according to an exemplary embodiment.

Referring to FIG. 16, the image encoder 400 performs operations of thecoding unit determiner 120 of the video encoding apparatus 100 to encodeimage data. For example, an intra predictor 410 performs intraprediction on coding units in an intra mode, from among a current frame405, and a motion estimator 420 and a motion compensator 425 performinter estimation and motion compensation, respectively, on coding unitsin an inter mode from among the current frame 405 by using the currentframe 405, and a reference frame 495.

Data output from the intra predictor 410, the motion estimator 420, andthe motion compensator 425 is output as a quantized transformationcoefficient through a transformer 430 and a quantizer 440. The quantizedtransformation coefficient is restored as data in a spatial domainthrough an inverse quantizer 460 and an inverse transformer 470. Therestored data in the spatial domain is output as the reference frame 495after being post-processed through a deblocking unit 480 and a loopfiltering unit 490. The quantized transformation coefficient may beoutput as a bitstream 455 through an entropy encoder 450.

In order for the image encoder 400 to be applied in the video encodingapparatus 100, elements of the image encoder 400, i.e., the intrapredictor 410, the motion estimator 420, the motion compensator 425, thetransformer 430, the quantizer 440, the entropy encoder 450, the inversequantizer 460, the inverse transformer 470, the deblocking unit 480, andthe loop filtering unit 490, perform operations based on each codingunit from among coding units having a tree structure while consideringthe maximum depth of each maximum coding unit.

Specifically, the intra predictor 410, the motion estimator 420, and themotion compensator 425 determine partitions and a prediction mode ofeach coding unit from among the coding units having a tree structurewhile considering a maximum size and a maximum depth of a currentmaximum coding unit, and the transformer 430 determines a size of thetransformation unit in each coding unit from among the coding unitshaving a tree structure.

FIG. 17 is a block diagram of an image decoder 500 based on codingunits, according to an exemplary embodiment.

Referring to FIG. 17, a parser 510 parses encoded image data to bedecoded and information about encoding used for decoding from abitstream 505. The encoded image data is output as inverse quantizeddata through an entropy decoder 520 and an inverse quantizer 530, andthe inverse quantized data is restored to image data in a spatial domainthrough an inverse transformer 540.

An intra predictor 550 performs intra prediction on coding units in anintra mode with respect to the image data in the spatial domain, and amotion compensator 560 performs motion compensation on coding units inan inter mode by using a reference frame 585.

The image data in the spatial domain, which passed through the intrapredictor 550 and the motion compensator 560, may be output as arestored frame 595 after being post-processed through a deblocking unit570 and a loop filtering unit 580. Also, the image data that ispost-processed through the deblocking unit 570 and the loop filteringunit 580 may be output as the reference frame 585.

In order to decode the image data in the image data decoder 230 of thevideo decoding apparatus 200, the image decoder 500 may performoperations that are performed after the parser 510.

In order for the image decoder 500 to be applied in the video decodingapparatus 200, elements of the image decoder 500, i.e., the parser 510,the entropy decoder 520, the inverse quantizer 530, the inversetransformer 540, the intra predictor 550, the motion compensator 560,the deblocking unit 570, and the loop filtering unit 580, performoperations based on coding units having a tree structure for eachmaximum coding unit.

Specifically, the intra prediction 550 and the motion compensator 560need to determine partitions and a prediction mode for each of thecoding units having a tree structure, and the inverse transformer 540need to determine a size of a transformation unit for each coding unit.

FIG. 18 is a diagram illustrating deeper coding units according todepths, and partitions, according to an exemplary embodiment.

A video encoding apparatus 100 and a video decoding apparatus 200 usehierarchical coding units so as to consider characteristics of an image.A maximum height, a maximum width, and a maximum depth of coding unitsmay be adaptively determined according to the characteristics of theimage, or may be differently set by a user. Sizes of deeper coding unitsaccording to depths may be determined according to a predeterminedmaximum size of the coding unit.

In a hierarchical structure 600 of coding units, the maximum height andthe maximum width of the coding units are each 64, and the maximum depthis 4. Here, the maximum depth indicates a total number of splits from amaximum coding unit to a minimum coding unit. Since a depth increasesalong a vertical axis of the hierarchical structure 600, a height and awidth of the deeper coding units are each split. Also, a prediction unitand partitions, which are bases for prediction encoding of each deepercoding unit, are shown along a horizontal axis of the hierarchicalstructure 600.

For example, a first coding unit 610 is a maximum coding unit in thehierarchical structure 600, wherein a depth thereof is 0 and a size,i.e., a height by width, thereof is 64×64. The depth increases along thevertical axis such that the hierarchical structure 600 includes a secondcoding unit 620 having a size of 32×32 and a depth of 1, a third codingunit 630 having a size of 16×16 and a depth of 2, and a fourth codingunit 640 having a size of 8×8 and a depth of 3. The fourth coding unit640 having the size of 8×8 and the depth of 3 is a minimum coding unit.

The prediction unit and the partitions of the coding units 610, 620,630, 640 and 650 are arranged along the horizontal axis according toeach depth. In other words, if the first coding unit 610 having the sizeof 64×64 and the depth of 0 is a prediction unit, the prediction unitmay be split into partitions included in the first coding unit 610,i.e., a partition 610 having a size of 64×64, partitions 612 having asize of 64×32, partitions 614 having the size of 32×64, or partitions616 having a size of 32×32.

Similarly, a prediction unit of the second coding unit 620 having thesize of 32×32 and the depth of 1 may be split into partitions includedin the second coding unit 620, i.e., a partition 620 having a size of32×32, partitions 622 having a size of 32×16, partitions 624 having asize of 16×32, and partitions 626 having a size of 16×16.

Similarly, a prediction unit of the third coding unit 630 having thesize of 16×16 and the depth of 2 may be split into partitions includedin the third coding unit 630, i.e., a partition having a size of 16×16included in the third coding unit 630, partitions 632 having a size of16×8, partitions 634 having a size of 8×16, and partitions 636 having asize of 8×8.

Similarly, a prediction unit of the fourth coding unit 640 having thesize of 8×8 and the depth of 3 may be split into partitions included inthe fourth coding unit 640, i.e., a partition having a size of 8×8included in the fourth coding unit 640, partitions 642 having a size of8×4, partitions 644 having a size of 4×8, and partitions 646 having asize of 4×4.

Similarly, a prediction unit of the fourth coding unit 650 having thesize of 4×4 and the depth of 4 may be split into partitions included inthe fourth coding unit 650, i.e., a partition having a size of 4×4included in the fourth coding unit 650, partitions 652 having a size of4×2, partitions 654 having a size of 2×4, and partitions 656 having asize of 2×2.

In order to determine the at least one coded depth of the coding unitsof the maximum coding unit 610, the coding unit determiner 120 of thevideo encoding apparatus 100 is required to perform encoding for codingunits corresponding to each depth included in the maximum coding unit610.

A total number of deeper coding units according to depths including datain the same range and the same size increases as the depth increases.For example, four coding units corresponding to a depth of 2 arerequired to cover data that is included in one coding unit correspondingto a depth of 1. Accordingly, in order to compare encoding results ofthe same data according to depths, the coding unit corresponding to thedepth of 1 and four coding units corresponding to the depth of 2 areeach encoded.

In order to perform encoding for a current depth from among the depths,a minimum encoding error may be selected for the current depth byperforming encoding for each prediction unit in the coding unitscorresponding to the current depth, along the horizontal axis of thehierarchical structure 600. Alternatively, the minimum encoding errormay be searched for by comparing the minimum encoding errors accordingto depths, by performing encoding for each depth as the depth increasesalong the vertical axis of the hierarchical structure 600. A depth and apartition having the minimum encoding error in the first coding unit 610may be selected as the coded depth and a partition type of the firstcoding unit 610.

FIG. 19 is a diagram for describing a relationship between a coding unit710 and transformation units 720, according to an exemplary embodiment.

The video encoding apparatus 100 and a video decoding apparatus 200encode and decode, respectively, an image according to coding unitshaving sizes smaller than or equal to a maximum coding unit for eachmaximum coding unit. Sizes of transformation units for transformationduring encoding may be selected based on data units that are not largerthan a corresponding coding unit.

For example, in the video encoding apparatus 100, if a size of thecoding unit 710 is 64×64, transformation may be performed by using thetransformation units 720 having a size of 32×32.

Also, data of the coding unit 710 having the size of 64×64 may beencoded by performing the transformation on each of the transformationunits having the size of 32×32, 16×16, 8×8, and 4×4, which are smallerthan 64×64, and then a transformation unit having the least codingerrors may be selected.

FIG. 20 is a diagram for describing encoding information of coding unitscorresponding to a coded depth, according to an exemplary embodiment.

The output unit 130 of a video encoding apparatus 100 may encode andtransmit first information 800 about a partition type, secondinformation 810 about a prediction mode, and third information 820 abouta size of a transformation unit for each coding unit corresponding to acoded depth, as information about an encoding mode.

The first information 800 indicates information about a shape of apartition obtained by splitting a prediction unit of a current codingunit, wherein the partition is a data unit for prediction encoding thecurrent coding unit. For example, a current coding unit CU_(—)0 having asize of 2N×2N may be split into any one of a partition 802 having a sizeof 2N×2N, a partition 804 having a size of 2N×N, a partition 806 havinga size of N×2N, and a partition 808 having a size of N×N. Here, thefirst information 800 about a partition type is set to indicate one ofthe partition 804 having a size of 2N×N, the partition 806 having a sizeof N×2N, and the partition 808 having a size of N×N

The second information 810 indicates a prediction mode of eachpartition. For example, the second information 810 may indicate a modeof prediction encoding performed on a partition indicated by the firstinformation 800, i.e., an intra mode 812, an inter mode 814, or a skipmode 816.

The third information 820 indicates a transformation unit to be based onwhen transformation is performed on a current coding unit. For example,the transformation unit may be a first intra transformation unit 822, asecond intra transformation unit 824, a first inter transformation unit826, or a second intra transformation unit 828.

An image data and encoding information extractor 220 of a video decodingapparatus 200 may extract and use the information 800, 810, and 820 fordecoding, according to each deeper coding unit.

FIG. 21 is a diagram of deeper coding units according to depths,according to an exemplary embodiment.

Split information may be used to indicate a change of a depth. The spiltinformation indicates whether a coding unit of a current depth is splitinto coding units of a lower depth.

A prediction unit 910 for prediction encoding a coding unit 900 having adepth of 0 and a size of 2N_(—)0×2N_(—)0 may include partitions of apartition type 912 having a size of 2N_(—)0×2N_(—)0, a partition type914 having a size of 2N_(—)0×N_(—)0, a partition type 916 having a sizeof N_(—)0×2N_(—)0, and a partition type 918 having a size ofN_(—)0×N_(—)0. FIG. 9 only illustrates the partition types 912 through918 which are obtained by symmetrically splitting the prediction unit910, but it is understood that a partition type is not limited theretoin another embodiment. For example, the partitions of the predictionunit 910 may include asymmetrical partitions, partitions having apredetermined shape, and partitions having a geometrical shape.

Prediction encoding is repeatedly performed on one partition having asize of 2N_(—)0×2N_(—)0, two partitions having a size of 2N_(—)0×N_(—)0,two partitions having a size of N_(—)0×2N_(—)0, and four partitionshaving a size of N_(—)0×N_(—)0, according to each partition type. Theprediction encoding in an intra mode and an inter mode may be performedon the partitions having the sizes of 2N_(—)0×2N_(—)0, N_(—)0×2N_(—)0,2N_(—)0×N_(—)0, and N_(—)0×N_(—)0. The prediction encoding in a skipmode is performed only on the partition having the size of2N_(—)0×2N_(—)0.

Errors of encoding including the prediction encoding in the partitiontypes 912 through 918 are compared, and the minimum encoding error isdetermined among the partition types. If an encoding error is smallestin one of the partition types 912 through 916, the prediction unit 910may not be split into a lower depth.

If the encoding error is the smallest in the partition type 918, a depthis changed from 0 to 1 to split the partition type 918 in operation 920,and encoding is repeatedly performed on coding units 930 having a depthof 2 and a size of N_(—)0×N_(—)0 to search for a minimum encoding error.

A prediction unit 940 for prediction encoding the coding unit 930 havinga depth of 1 and a size of 2N_(—)1×2N_(—)1 (=N_(—)0×N_(—)0) may includepartitions of a partition type 942 having a size of 2N_(—)1×2N_(—)1, apartition type 944 having a size of 2N_(—)1×N_(—)1, a partition type 946having a size of N_(—)1×2N_(—)1, and a partition type 948 having a sizeof N_(—)1×N_(—)1.

If an encoding error is the smallest in the partition type 948, a depthis changed from 1 to 2 to split the partition type 948 in operation 950,and encoding is repeatedly performed on coding units 960, which have adepth of 2 and a size of N_(—)2×N_(—)2 to search for a minimum encodingerror.

When a maximum depth is d, the coding unit according to each depth maybe performed up to when a depth becomes d−1, and split information maybe encoded up to when a depth is one of 0 to d−2. For example, whenencoding is performed up to when the depth is d−1 after a coding unitcorresponding to a depth of d−2 is split in operation 970, a predictionunit 990 for prediction encoding a coding unit 980 having a depth of d−1and a size of 2N_(d−1)×2N_(d−1) may include partitions of a partitiontype 992 having a size of 2N_(d−1)×2N_(d−1), a partition type 994 havinga size of 2N_(d−1)×N_(d−1), a partition type 996 having a size ofN_(d−1)×2N_(d−1), and a partition type 998 having a size ofN_(d−1)×N_(d−1).

Prediction encoding may be repeatedly performed on one partition havinga size of 2N_(d−1)×2N_(d−1), two partitions having a size of2N_(d−1)×N_(d−1), two partitions having a size of N_(d−1)×2N_(d−1), fourpartitions having a size of N_(d−1)×N_(d−1) from among the partitiontypes 992 through 998 to search for a partition type having a minimumencoding error.

Even when the partition type 998 has the minimum encoding error, since amaximum depth is d, a coding unit CU_(d−1) having a depth of d−1 is nolonger split to a lower depth, and a coded depth for the coding units ofa current maximum coding unit 900 is determined to be d−1 and apartition type of the current maximum coding unit 900 may be determinedto be N_(d−1)×N_(d−1). Also, since the maximum depth is d and a minimumcoding unit 980 having a lowermost depth of d−1 is no longer split to alower depth, split information for the minimum coding unit 980 is notset.

A data unit 999 may be considered a minimum unit for the current maximumcoding unit. A minimum unit may be a rectangular data unit obtained bysplitting a minimum coding unit 980 by 4. By performing the encodingrepeatedly, a video encoding apparatus 100 may select a depth having theminimum encoding error by comparing encoding errors according to depthsof the coding unit 900 to determine a coded depth, and set acorresponding partition type and a prediction mode as an encoding modeof the coded depth.

As such, the minimum encoding errors according to depths are compared inall of the depths of 1 through d, and a depth having the least encodingerrors may be determined as a coded depth. At least one of the codeddepth, the partition type of the prediction unit, and the predictionmode may be encoded and transmitted as information about an encodingmode. Also, since a coding unit is split from a depth of 0 to a codeddepth, only split information of the coded depth is set to 0, and splitinformation of depths excluding the coded depth are set to 1.

An image data and encoding information extractor 220 of a video decodingapparatus 200 may extract and use the information about the coded depthand the prediction unit of the coding unit 900 to decode the partition912. The video decoding apparatus 200 may determine a depth, in whichsplit information is 0, as a coded depth by using split informationaccording to depths, and use information about an encoding mode of thecorresponding depth for decoding.

FIGS. 22 through 24 are diagrams for describing a relationship betweencoding units 1010, prediction units 1060, and transformation units 1070,according to an exemplary embodiment.

The coding units 1010 are coding units having a tree structure,corresponding to coded depths determined by a video encoding apparatus100, in a maximum coding unit. The prediction units 1060 are partitionsof prediction units of each of the coding units 1010, and thetransformation units 1070 are transformation units of each of the codingunits 1010.

When a depth of a maximum coding unit is 0 in the coding units 1010,depths of coding units 1012 and 1054 are 1, depths of coding units 1014,1016, 1018, 1028, 1050, and 1052 are 2, depths of coding units 1020,1022, 1024, 1026, 1030, 1032, and 1048 are 3, and depths of coding units1040, 1042, 1044, and 1046 are 4.

In the prediction units 1060, some encoding units 1014, 1016, 1022,1032, 1048, 1050, 1052, and 1054 are obtained by splitting the codingunits of the coding units 1010. For example, partition types in thecoding units 1014, 1022, 1050, and 1054 have a size of 2N×N, partitiontypes in the coding units 1016, 1048, and 1052 have a size of N×2N, anda partition type of the coding unit 1032 has a size of N×N. Predictionunits and partitions of the coding units 1010 are smaller than or equalto each coding unit.

Transformation or inverse transformation is performed on image data ofthe coding unit 1052 in the transformation units 1070 in a data unitthat is smaller than the coding unit 1052. Also, the coding units 1014,1016, 1022, 1032, 1048, 1050, and 1052 in the transformation units 1070are different from those in the prediction units 1060 in terms of sizesand shapes. For example, video encoding and decoding apparatuses 100 and200 may perform intra prediction, motion estimation, motioncompensation, transformation, and inverse-transformation individually ona data unit in the same coding unit.

Accordingly, encoding is recursively performed on each of coding unitshaving a hierarchical structure in each region of a maximum coding unitto determine an optimum coding unit, and thus coding units having arecursive tree structure may be obtained. Encoding information mayinclude at least one of split information about a coding unit,information about a partition type, information about a prediction mode,and information about a size of a transformation unit. Table 1 showsexemplary encoding information that may be set by the video encoding anddecoding apparatuses 100 and 200.

TABLE 1 Split Information 0 Split (Encoding on Coding Unit having Sizeof 2N × 2N and Current Depth of d) Information 1 Prediction PartitionType Size of Transformation Unit Repeatedly Mode Encode IntraSymmetrical Asymmetrical Split Split Coding Units Inter PartitionPartition Information 0 of Information 1 of having Skip Type TypeTransformation Transformation Lower Depth (Only Unit Unit of d + 1 2N ×2N) 2N × 2N 2N × nU 2N × 2N N × N 2N × N 2N × nD (Symmetrical N × 2N nL× 2N Type) N × N nR × 2N N/2 × N/2 (Asymmetrical Type)

The output unit 130 of the video encoding apparatus 100 may output theencoding information about the coding units having a tree structure, andthe image data and encoding information extractor 220 of the videodecoding apparatus 200 may extract the encoding information about thecoding units having a tree structure from a received bitstream.

Split information indicates whether a current coding unit is split intocoding units of a lower depth. If split information of a current depth dis 0, a depth in which a current coding unit is no longer split into alower depth is a coded depth, and thus information about a partitiontype, prediction mode, and a size of a transformation unit may bedefined for the coded depth. If the current coding unit is further splitaccording to the split information, encoding is independently performedon four split coding units of a lower depth.

A prediction mode may be one of an intra mode, an inter mode, and a skipmode. The intra mode and the inter mode may be defined in all partitiontypes, and the skip mode may be defined only in a partition type havinga size of 2N×2N.

The information about the partition type may indicate symmetricalpartition types having sizes of 2N×2N, 2N×N, N×2N, and N×N, which areobtained by symmetrically splitting at least one of a height and a widthof a prediction unit, and asymmetrical partition types having sizes of2N×nU, 2N×nD, nL×2N, and nR×2N, which are obtained by asymmetricallysplitting at least one of the height and the width of the predictionunit. The asymmetrical partition types having the sizes of 2N×nU and2N×nD may be respectively obtained by splitting the height of theprediction unit in 1:3 and 3:1, and the asymmetrical partition typeshaving the sizes of nL×2N and nR×2N may be respectively obtained bysplitting the width of the prediction unit in 1:3 and 3:1

The size of the transformation unit may be set to be two types in theintra mode and two types in the inter mode. For example, if splitinformation of the transformation unit is 0, the size of thetransformation unit may be 2N×2N, which is the size of the currentcoding unit. If split information of the transformation unit is 1, thetransformation units may be obtained by splitting the current codingunit. Also, if a partition type of the current coding unit having thesize of 2N×2N is a symmetrical partition type, a size of atransformation unit may be N×N, and if the partition type of the currentcoding unit is an asymmetrical partition type, the size of thetransformation unit may be N/2×N/2.

The encoding information about coding units having a tree structure mayinclude at least one of a coding unit corresponding to a coded depth, aprediction unit, and a minimum unit. The coding unit corresponding tothe coded depth may include at least one of a prediction unit and aminimum unit including the same encoding information.

Accordingly, it is determined whether adjacent data units are includedin the same coding unit corresponding to the coded depth by comparingencoding information of the adjacent data units. Also, a correspondingcoding unit corresponding to a coded depth is determined by usingencoding information of a data unit, and thus a distribution of codeddepths in a maximum coding unit may be determined.

Therefore, if a current coding unit is predicted based on encodinginformation of adjacent data units, encoding information of data unitsin deeper coding units adjacent to the current coding unit may bedirectly referred to and used.

In another embodiment, if a current coding unit is predicted based onencoding information of adjacent data units, data units adjacent to thecurrent coding unit are searched using encoded information of the dataunits, and the searched adjacent coding units may be referred to forpredicting the current coding unit.

FIG. 25 is a diagram for describing a relationship between a codingunit, a prediction unit or a partition, and a transformation unit,according to encoding mode information of Table 1 according to anexemplary embodiment.

A maximum coding unit 1300 includes coding units 1302, 1304, 1306, 1312,1314, 1316, and 1318 of coded depths. Here, since the coding unit 1318is a coding unit of a coded depth, split information may be set to 0.Information about a partition type of the coding unit 1318 having a sizeof 2N×2N may be set to be a partition type 1322 having a size of 2N×2N,a partition type 1324 having a size of 2N×N, a partition type 1326having a size of N×2N, a partition type 1328 having a size of N×N, apartition type 1332 having a size of 2N×nU, a partition type 1334 havinga size of 2N×nD, a partition type 1336 having a size of nL×2N, or apartition type 1338 having a size of nR×2N.

Transformation-unit split information TU size flag may be one oftransform indexes, and a size of the transformation unit thatcorresponds to the transform index may be changed according to aprediction unit type or a partition type of the coding unit.

For example, when the partition type is set to be symmetrical, i.e., thepartition type 1322, 1324, 1326, or 1328, a transformation unit 1342having a size of 2N×2N is set if the transformation-unit splitinformation is 0, and a transformation unit 1344 having a size of N×N isset if the transformation-unit split information is 1.

When the partition type is set to be asymmetrical, i.e., the partitiontype 1332, 1334, 1336, or 1338, a transformation unit 1352 having a sizeof 2N×2N is set if the transformation-unit split information is 0, and atransformation unit 1354 having a size of N/2×N/2 is set if thetransformation-unit split information is 1.

Referring to FIG. 21, the transformation-unit split information TU sizeflag is a flag having a value or 0 or 1, though it is understood thatanother embodiment is not limited to a 1-bit flag, and a transformationunit may be hierarchically split having a tree structure while thetransformation-unit split information increases from 0 in anotherembodiment. The transformation-unit split information may be used as anembodiment of the transform index.

In this case, when the transformation-unit split information is usedtogether with a maximum size of a transformation unit and a minimum sizethereof, the size of an actually used transformation unit may berepresented. The video encoding apparatus 100 may encode sizeinformation of a maximum transformation unit, size information of aminimum transformation unit, and maximum split information of atransformation unit. The encoded size information of the maximumtransformation unit, the encoded size information of the minimumtransformation unit, and the maximum split information of atransformation unit may be inserted into the SPS. The video decodingapparatus 200 may perform video decoding by using the size informationof the maximum transformation unit, the size information of the minimumtransformation unit, and the maximum split information of atransformation unit.

For example, when a current coding unit has a size of 64×64, a maximumtransformation unit has a size of 32×32, and transformation-unit splitinformation is 0, a transformation unit may be set to have a size of32×32. When the current encoding unit has a size of 64×64, the maximumtransformation unit has a size of 32×32, and the transformation-unitsplit information is 1, the transformation unit may be set to have asize of 16×16. When the current encoding unit has a size of 64×64, themaximum transformation unit has a size of 32×32, and thetransformation-unit split information is 2, the transformation unit maybe set to have a size of 8×8.

For example, when the current coding unit has a size of 32×32, a minimumtransformation unit has a size of 32×32, and the transformation-unitsplit information is 0, the transformation unit may be set to have asize of 32×32. Since the size of the transformation unit cannot besmaller than 32×32, no transformation-unit split information can be set.

For example, when the current encoding unit has a size of 64×64 andmaximum split information of a transformation unit is 1, thetransformation-unit split information may be 0 or 1, and othertransformation-unit split information cannot be set.

Accordingly, when the maximum split information of a transformation unitis defined as ‘MaxTransformSizeIndex’, the size of the minimumtransformation unit is defined as ‘MinTransformSize’, and the size of atransformation unit when the transformation-unit split information is 0is defined as ‘RootTuSize’, a minimum transformation unit size possibleat a current coding unit, ‘CurrMinTuSize’, may be defined as thefollowing relationship Equation (1):

CurrMinTuSize=max(MinTransformSize,RootTuSize/(2̂MaxTransformSizeIndex))  (1)

In comparison with the minimum transformation unit size possible at acurrent coding unit, ‘CurrMinTuSize’, the transformation unit size whenthe TU size flag is 0, ‘RootTuSize’, may represent a maximumtransformation unit size that can be employed by a system. In otherwords, according to the relationship Equation (1), since‘RootTuSize/(2̂MaxTransformSizeIndex)’ denotes a transformation unit sizeobtained by splitting the transformation unit size when thetransformation-unit split information is 0, ‘RootTuSize’, by a number oftimes corresponding to the maximum split information of a transformationunit, and ‘MinTransformSize’ denotes a minimum transformation unit size,a smaller size from among the two sizes may be the minimumtransformation unit size possible at the current coding unit,‘CurrMinTuSize’.

The current maximum transformation unit size RootTuSize may varydepending on the type of prediction mode.

For example, when a current prediction mode is an inter mode, RootTuSizemay be determined according to relationship Equation (2) below, where‘MaxTransformSize’ indicates a maximum transformation unit size and‘PUSize’ indicates a current prediction unit size:

RootTuSize=min(MaxTransformSize,PUSize)  (2)

In other words, when the current prediction mode is an inter mode, thetransformation unit size when the transformation-unit split informationis 0, ‘RootTuSize’, may be set to be a smaller size from among themaximum transformation unit size and the current prediction unit size.

When a prediction mode of a current partition unit is an intra mode,‘RootTuSize’ may be determined according to relationship Equation (3)below, where ‘PartitionSize’ indicates the size of the current partitionunit:

RootTuSize=min(MaxTransformSize,PartitionSize)  (3)

In other words, when the current prediction mode is an intra mode, thetransformation unit size when the transformation-unit split informationis 0, ‘RootTuSize’, may be set to be a smaller size from among themaximum transformation unit size and the current partition unit size.

However, it should be noted that a current maximum transformation unitsize ‘RootTuSize’ that varies according to the prediction mode of apartition unit is only an embodiment, and that a factor for determiningthe current maximum transformation unit size ‘RootTuSize’ is not limitedto the embodiment.

FIG. 26 is a flowchart illustrating a video encoding method using acoding unit in a tree structure and a transformation unit in a variabletree-structure, according to an exemplary embodiment.

In operation 1210, a current picture is split into at least one maximumcoding unit. A maximum depth indicating a total number of possiblesplitting splits may be set in advance.

In operation 1220, at least one split region obtained by splitting aregion of the maximum coding unit according to depths is encoded, sothat a coded depth to output a final encoding result is determined foreach at least one split region and the coding unit in the tree structureand the transformation unit in the variable tree-structure aredetermined.

The maximum coding unit is spatially split whenever the depth increases,and thus is split into coding units of a lower depth. Each coding unitmay be split into coding units of another lower depth by being spatiallysplit independently from adjacent coding units. Encoding is repeatedlyperformed on each coding unit according to depths.

Also, partition types and transformation units having a minimum encodingerror are determined for each deeper coding unit. In order to determinea coded depth having a minimum encoding error in each maximum codingunit, encoding errors may be measured and compared in all deeper codingunits according to depths.

When each coding unit is determined, a transformation unit fortransformation of the coding unit may be determined. The transformationunit may be determined as a data unit that minimizes an error caused bytransforming the coding unit. As a result of performing a transformationbased on levels according to transformation depths in a current codingunit, a transformation unit in a tree structure which is independentfrom another transformation unit in an adjacent region and which forms ahierarchical structure with transformation units according to depths inthe same region may be determined.

Also, a maximum split level of the transformation unit may be previouslyset for each maximum coding unit or each coding unit. According to amaximum split level of the current coding unit, a transformation may beperformed by using transformation units in a variable tree-structureincluding a base transformation unit through a minimum transformationunit which are allowed for the current coding unit. Transformation unitswith a transformation depth which output an encoding result having aminimum error may be determined from the transformation units in thevariable tree-structure with respect to the current coding unit, so thatthe transformation units in the tree structure may be determined.

In operation 1230, image data being a final result of the encoding of atleast one split region of each maximum coding unit is output, withencoded information about a coded depth and an encoding mode. Theencoded information about the encoding mode may include informationabout a coded depth or split information, information about a partitiontype of a prediction unit, and a prediction mode, andtransformation-unit hierarchical-structure information. The encodedinformation about the encoding mode may be transmitted to a decoder withthe encoded image data.

FIG. 27 is a flowchart illustrating a video decoding method using acoding unit in a tree structure and a transformation unit in a variabletree-structure, according to an exemplary embodiment.

In operation 1310, a bitstream of an encoded video is received andparsed.

In operation 1320, encoded image data of a current picture assigned to amaximum coding unit is acquired from the parsed bitstream, andinformation about a coded depth and an encoding mode according tomaximum coding units are extracted from the parsed bitstream. The codeddepth of each maximum coding unit is a depth having a minimum encodingerror in each maximum coding unit. In encoding each maximum coding unit,the image data is encoded based on at least one data unit obtained byhierarchically splitting each maximum coding unit according to depths.

According to the information about the coded depth and the encodingmode, the maximum coding unit may be split into coding units having atree structure. Each of the coding units having the tree structure isdetermined as a coding unit corresponding to a coded depth, and isoptimally encoded as to output the minimum encoding error. Accordingly,encoding and decoding efficiency of an image may be improved by decodingeach piece of encoded image data in the coding units having a treestructure after determining at least one coded depth according to codingunits.

Also, according to extracted transformation-unit hierarchical-structureinformation, the transformation unit in the tree structure may bedetermined in the coding unit. For example, a total number of levelsfrom a base transformation unit to a transformation unit at a lowermostlevel which are allowed for a current coding unit may be read based onthe transformation-unit maximum split information. Alternatively, thetotal number of levels from the base transformation unit to thetransformation unit at the lowermost level may be determined based on amaximum split level that is set in advance between encoding and decodingsystems.

The base transformation unit may be variously determined according to anencoding mode based on a pre-set scheme. Thus, transformation units in avariable tree-structure with respect to the current coding unit may bedetermined based on the transformation-unit maximum split information,and a transformation unit with a transformation depth to be used ininverse-transformation with respect to the current coding unit may bedetermined from among the transformation units in the variabletree-structure.

In operation 1330, the encoded image data of each maximum coding unit isdecoded based on the information about a coded depth and an encodingmode according to maximum coding units. In this regard, theinverse-transformation may be performed on the current coding unit byusing the transformation unit that is determined from among thetransformation units in the variable tree-structure while decoding isperformed on the current coding unit based on the information about acoded depth and an encoding mode. As decoding is performed on eachcoding unit and each maximum coding unit, image data of a spatial regionmay be restored and then a picture and a video that is a picturesequence may be restored. The restored video may be reproduced by areproducing apparatus, may be stored in a storage medium, or may betransmitted via a network.

Exemplary embodiments may be written as computer programs and can beimplemented in general-use digital computers that execute the programsusing a computer readable recording medium. In addition, a datastructure used in an exemplary embodiment can be written in a computerreadable recording medium through various means. Examples of thecomputer readable recording medium include magnetic storage media (e.g.,ROM, floppy disks, hard disks, etc.), optical recording media (e.g.,CD-ROMs, or DVDs), etc.

While the inventive concept has been particularly shown and describedwith reference to exemplary embodiments thereof, it will be understoodby those of ordinary skill in the art that various changes in form anddetails may be made therein without departing from the spirit and scopeof the inventive concept as defined by the appended claims. Theexemplary embodiments should be considered in a descriptive sense onlyand not for purposes of limitation. Therefore, the scope of theinventive concept is defined not by the detailed description but by theappended claims.

1. A video decoding apparatus comprising: an extracting unit whichobtains, from a bitstream, maximum split information for an intra mode,information about a prediction mode for a coding unit, and sub-splitinformation about a transformation unit; and a decoding unit whichdetermines a maximum split level of the transformation unit based on themaximum split information for the intra mode when the information aboutthe prediction mode indicates the intra mode, wherein the transformationunit is determined from the coding unit, wherein the extracting unitobtains a sub-split information about a current transformation unit fromthe bitstream when a current split level of the current transformationunit is less than the maximum split level, and wherein the decoding unitsplits the current transformation unit into transformation units of anext split level when the sub-split information about the currenttransformation unit indicates a split of the current transformationunit, wherein the next split level is greater than the current splitlevel.
 2. The video decoding apparatus of claim 1, wherein the maximumsplit information indicates a maximum number of available splits forgenerating the transformation unit by splitting the coding unit.
 3. Thevideo decoding apparatus of claim 1, wherein the maximum splitinformation for the intra mode is obtained as parameters with respect toone data level from among data levels comprising a picture sequence, apicture, a slice, and a data unit for encoding a video.
 4. The videodecoding apparatus of claim 1, wherein a minimum size of thetransformation unit determined from the coding unit based on the maximumsplit level of the transformation unit is not less than a minimum sizeof a transformation unit according to minimum size information oftransformation unit obtained from the bitstream or a size of atransformation unit at a lowermost level obtained by splitting thecoding unit to the maximum split level.